Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When clicking on the expand all, the angular.js script becomes unresponsive.
I have tried with both enabled and disabled js aggration and compression but no difference.
There are maybe 150 files and folders in the tree, maybe that is too much?
I have noticed this behaviour on Firefox, Chrome and IE.
As a workaround I have hidden the Expand/Collapse all context links.
Cheers, Joep
Comment | File | Size | Author |
---|---|---|---|
#6 | 2015-11-12_22-56-17.png | 306.37 KB | joep.hendrix |
#2 | 2015-11-12_21-34-10.png | 98.27 KB | joep.hendrix |
Comments
Comment #2
joep.hendrix CreditAttribution: joep.hendrix at CompuBase Internet Solutions commentedComment #3
joep.hendrix CreditAttribution: joep.hendrix at CompuBase Internet Solutions commentedComment #4
joep.hendrix CreditAttribution: joep.hendrix at CompuBase Internet Solutions commentedComment #5
mpotter CreditAttribution: mpotter commentedI couldn't reproduce this on our site. I suppose it's possible it's an issue with a larger number of files. I have about 30 here in various taxonomy term folders. Are you getting any sort of Javascript error?
It's not doing anything back to the server for this...the files/folder widget isn't using Ajax and loads all of the file information for the entire display. So the Expand All is purely Javascript. Maybe you can use the Javascript profiler in Chrome to pin down where it is slow?
Comment #6
joep.hendrix CreditAttribution: joep.hendrix at CompuBase Internet Solutions commentedNo errors in the console.
To be more precise: on Chrome there is no error, the script just seems to stop without expanding all directories.
Attached the screenshot of the profiler.
Comment #7
joep.hendrix CreditAttribution: joep.hendrix at CompuBase Internet Solutions commentedComment #8
mpotter CreditAttribution: mpotter commentedUsing the angular.min.js isn't going to tell us much I'm afraid since it minifies all the function names. I'll put this in the backlog but welcome help from anyone else who can debug this.
Comment #9
Argus CreditAttribution: Argus as a volunteer commentedThe amount of files isn't the issue. I have no problem with 150+ files.
Comment #10
joep.hendrix CreditAttribution: joep.hendrix at CompuBase Internet Solutions commentedMaybe it is related to the amount of folders that need to be expanded?
Comment #11
dureaghin CreditAttribution: dureaghin commentedAngular ng-repeat is cause performance issues on large collections angular-tree-control.
I think it is better to switch over to Fancytree. Fancytree works very well for large trees.
Comment #12
mpotter CreditAttribution: mpotter commentedExcept that FancyTree uses jQuery and this widget needs something that works well with AngularJS apps. The solution is probably some limit on how deep the ng-repeat goes or converting the entire script to only "fetch on demand" as folders are clicked.
Comment #13
dureaghin CreditAttribution: dureaghin commentedWe switched "ng-treecontrol" over to AngularJS UI Tree and it already works very well for large trees.
Thanks,
Alex.
Comment #14
joep.hendrix CreditAttribution: joep.hendrix at CompuBase Internet Solutions commented@dureaghin: that is great news.
It would be nice if you could show us what steps you have taken to implement AngularJS UI Tree.
Thanks in advance!
Comment #15
dureaghin CreditAttribution: dureaghin commentedHi Joep Hendrix.
Sorry for the late reply, actually we had the same problem with "AngularJS UI Tree".
Aggregation, compression and Redis or Memcache not will help much to make "oa_files" module faster.
Currently we have around 1500 files in one file section and the first load takes around 1 minute without Memcache, with Memcache from 30 to 40 sec. Very easy to reproduce this in all Open Atrium releases.
Steps:
1. Create a new Space
2. Create a new Files Section
3. Create 100 folders with sub folder then upload for example 500 files to one of the folder then another 1000 files to other folders
4. Once folders and files added, reload the page
5. Now you should see the slowness
We fixed issue with ngRepeat directive when you click to expand all children nodes from the folders, now it works much faster. We integrated angular-vs-repeat into "oa_files" and "oa_angular" module. But the first time load is not related to the "angular-tree-control". We think the problem with "oa_files_treeview.inc", please check for example one of the function "oa_files_treeview_render". Looks like this function slowing everything and if you will comment this out then the first load will be faster because we're not making foreach for all the files from parent. The problem is because when you load the page it's querying all parent nodes and all children nodes, then menu links, then access, then files.
Also, something wrong with this code from "oa_files_treeview.inc" file:
We'll try to do more investigation on this and reply back with results.
Also, I can upload our changes so you can check what we did.
Thanks,
Alex.
Comment #16
dureaghin CreditAttribution: dureaghin commentedUpdated issue metadata to version 7.x-2.618, because this issue persist in all versions.
Thanks,
Alex.