Re: Folders not collapsing

Home \ forums/reply
#1539

Michael Gilkes
Keymaster

@nomed01. The “Mootools Upgrade” only refers to Joomla 1.5.

As for how long it takes for a page to load… this is something that persons need to understand is a function of how the HTML page loads the table element and also the processing a memory needed to recurse through numerous folders and files.

First of all, let’s set the record straight, the table on the webpage you just listed contains 2896 table rows in it. You are tying to show over 2000 files on a webpage. I hope I don’t sound mean or disrespectful, but honestly… no one should be attempting to display any table that shows over 2000 files. This fact has nothing to do with my plugin or any similar Joomla extension for displaying files in a table. Of course, a page is going to take an exorbitant amount of time to load over 2000 files. The javascript has nothing to do with it.

If you are going to list a folder structure that contains numerous subfolders with nested levels and lots of files, you need to understand that this will slow down any page. Even without the Javascript handling the collapsing, when you have a large table by itself the entire page will not load until the entire table loads. This is the reason why tables are no longer used for layout in a webpage (apart from it being cumbersome to work with). The entire table must be loaded before the page can be viewed.

If you are going to load a large table with lots of files, it may cause a performance issue on the page. With javascript handling collapsing of nested subfolders, there is a lot of recursion involved in making everything work, that takes quite a bit of processing power and memory usage to do in general.

Setting Collapse to Yes(1) only affects what is done after the page is loaded. Even if you set it to No(0), if the table is large, the page will still take very long to load. That is not a result of the plugin, but a result of the fact that you are loading a huge table in HTML. This is just the way HTML tables work.

If you want to have a better performance you can do one or more of the following:

  • Use List instead of Table
  • If you want to use a table, list a reasonable amount of files and folders in one listing. For example, you could use multiple listings for various subfolders, instead of one listing for an extensive fodler structure
  • Set easing to Linear
  • Set transition duration to “short” or even 0

For your particular situation, you are going to need to display much fewer files, in multiple tables, and if possible on different webpages. In all honesty, my professional recommendation is that it is not good practice to display hundreds of files on a webpage. Easy Folder Listing Pro does indeed make it EASY to display hundreds of files, but I, as its developer, do not recommend it. It is not a good organizational practice, nor does it provide a good user experience.

Let me know what you think.