concretecms / brand_central

A digital asset management system extension for Concrete CMS.
13 stars 4 forks source link

concrete5 core filemanager folder picker is too slow with tons of files. Use async bootstrap select library #51

Open aembler opened 3 years ago

aembler commented 3 years ago

The concrete5 file manager folder picker pictured here:

image

Is too slow when there are lots of folders. In our Brandcentral install we have hundreds of folders, and it takes 11 seconds to populate this select menu, which slows the file manager down a lot. Can we use the async-bootstrap-select library that we have built into bedrock to work with this menu, instead of the regular bootstrap select, in order to make this faster?

bitterdev commented 3 years ago

Hi Andrew,

i have implement a custom logic that are queries the folder items with a recursive SQL query method. This method is much more powerful then the pervious one and should speed up the total query time into just a few milliseconds. I have choosed this way because implementing a async dropdown is much more time-intense. Please give me your feedback regarding to this suggestion.

bitterdev commented 3 years ago

see https://github.com/concrete5/concrete5/pull/9173

aembler commented 3 years ago

I merged in this pull request but I think we still have to go with an async model.

  1. With your changes we still only decreased the request to about 5 seconds, from 11. Which is a definite improvement, but still too slow. It creates this loader at the top of the file manager that hangs everything until it completes.
  2. We're no longer checking permissions on the nodes, which is a problem. We check them in the backend to see if the user has permission to add a particular file to a folder but we still shouldn't be showing the users folders that they don't have access to. This code used to be in the code that you replaced, but it's not there anymore.