gaitt wrote:I have 6 large well filled mega menu in my gallery, I notice that all the information are stored in every html file.
In a technical point of view, I have no clue if it good or bad, but can it slow down the gallery?
It's a good question ... but I am curious: How are you checking that the menu is stored in every html file? That is correct, but even if we loaded the menu via javascript in JSON format, it would still get "injected" into the html, but dynamically from the client.
Other than that, yes it can slow down the website before pages get cached. When X3 generates a page, it has to loop through all folders to create the menu, which is probably the heaviest X3 server task. Once a page gets cached, it should be irrelevant because the page is stored as a html file inside the app cache folder.
Normally when a visitor visits your pages, he will load the page with menu only once, because consecutive page clicks only load a JSON file that contains page data, EXCLUDING the menu. However, each of your pages will likely get created at some point on server as visitors arrive directly on them, and of course there are bots also that may force a full page creation.
We are working on some concepts so that the menu doesn't need to get created separately for each and every page. Either we will load the menu via javascript/json on page load, or we may just keep it like now, but make sure each page grabs a "cached" copy of the menu instead of having to recreate it.
Technical talk ...
gaitt wrote:An other question, when editing the gallery with the panel and checking the gallery just after, it takes 3-5s to load. And when I check what is going on, I see my 2 cores of my server CPU at full load with apache 2 doing stuff.
Yep, this is when X3 needs to recreate pages after you changed something from the panel. If you have a heavy folder structure, this will definitely be the main reason why it takes 3-5 seconds. The question is though, do you have the
preload option enabled? This would definitely be the reason why your server spends time ... You should disable it when you are editing.
gaitt wrote:How can I optimize here?
As long as preload is disabled, you can't really optimize much. In my opinion, cache is one of the wonderful features of X3, but the process of creating the menu has to happen at some point after editing. Once you refresh the page once, every visitor will see the cached version ... With a relatively heavy folder structure, you need to live with the "page processing time" after editing pages.
gaitt wrote:Also, I have written a "blog" post and I wasn't able to put a image into a grid. I manage to do it put with some standard html.
<ul class='small-block-grid-1 medium-block-grid-2 large-block-grid-4'>
<li>Block grids give you a way to evenly split contents of a list within the grid.</li>
<li>![image](http://image_url)</li>
<li>It will collapse to 2 items on each row for medium screens (tablet), and 1 item on each row for small screens.</li>
<li>Read more about the block grid <a href=http://foundation.zurb.com/docs/components/block_grid.html>here</a></li>
<li>Item 5</li>
<li>Item 6</li>
<li>Item 7</li>
<li>Item 8</li>
</ul>
Not quite sure what you are trying to do. You just want a custom grid with a custom image? ... or are you trying to add the blog preview image like for example in the mjau-mjau blog posts?
https://mjau-mjau.com/blog/ajax-universal-analytics/