You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Async loading child with large dataset doesn't always work, it doesn't works well with nodes that were rendered at the 1st load.
Steps to produce:
_ Create tree with virtual scroll and large dataset (10k) => tree is rendered fast and good when page load.
_ Create getChildren option which return promise with 10k nodes.
_ Click on nodes that were rendered at the 1st load => observe the delay time (~12 secs)
_ Scroll down and click on nodes that are down below => node is expanded quickly without delay.
Hello I am testing Angular Tree for our project and I think we're having the same issue.
I have a parent tree, let's say 30 items. My height only shows the first 10 items for example. If I scroll down to item 30 and click that folder to expand a large tree of 5k-10k items it takes roughly 3 seconds. However if I try to open item 1 folder and expand a large tree of 5k-10k it will take 10-11seconds to load. Big difference!
Ask: may we fix it so it also loads fast without having to scroll to item 30ish? within the viewport it is slow to render the 5k-10k
btw I'm doing this:
"useVirtualScroll: true, nodeHeight: 22"
setting folder wrapper height to 100px via css (only for testing, it could be 500px or more)
I would like to know if this may be fixed... or a hint on how we could fix it? This issue is the only thing holding us back from using Angular Tree but it's the only issue we see. Other than that, we love it!
Hello, this issue is still reproducible when the nodeHeight tree option is INodeHeightFn and not a number. The merged workaround handles only the case when nodeHeight is a number.
There is also another issue with this workaround - when doing the following calculation: const renderedNodesMaxLength = (Y_OFFSET * 2 + this.viewportHeight) / nodeHeight;
the renderedNodesMaxLength is not an integer number (13.9 for example).
This may result in inproper invalidation of the collection of nodes: if (lastIndex - firstIndex > renderedNodesMaxLength) { return []; }
LastIndex can be 28, and firstIndex can be 14, which is a valid scenario, but because renderedNodesMaxLength is not ceiled an empty array will be returned. The result is an empty screen with no rendered tree nodes.
Both issues described are easily reproducible in the example app.
Activity
markammay commentedon Nov 1, 2017
Hello I am testing Angular Tree for our project and I think we're having the same issue.
I have a parent tree, let's say 30 items. My height only shows the first 10 items for example. If I scroll down to item 30 and click that folder to expand a large tree of 5k-10k items it takes roughly 3 seconds. However if I try to open item 1 folder and expand a large tree of 5k-10k it will take 10-11seconds to load. Big difference!
Ask: may we fix it so it also loads fast without having to scroll to item 30ish? within the viewport it is slow to render the 5k-10k
btw I'm doing this:
I would like to know if this may be fixed... or a hint on how we could fix it? This issue is the only thing holding us back from using Angular Tree but it's the only issue we see. Other than that, we love it!
adamkleingit commentedon Nov 4, 2017
Just verified - so weird. Inspecting it.
I would really love some help debugging this @markammay @anhvupham
Thanks
jacmgh commentedon Dec 1, 2018
Anything new about this issue? It would be great if this one was solved. Other than that very nice and useful lib.
issue CirclonGroup#463 workaround
issue CirclonGroup#463 workaround
Merge pull request #696 from jacmgh/fix/issue-463
adamkleingit commentedon Dec 25, 2018
Merged and published in 8.1.0
Novkirishki commentedon Nov 13, 2020
Hello, this issue is still reproducible when the nodeHeight tree option is INodeHeightFn and not a number. The merged workaround handles only the case when nodeHeight is a number.
There is also another issue with this workaround - when doing the following calculation:
const renderedNodesMaxLength = (Y_OFFSET * 2 + this.viewportHeight) / nodeHeight;the renderedNodesMaxLength is not an integer number (13.9 for example).
This may result in inproper invalidation of the collection of nodes:
if (lastIndex - firstIndex > renderedNodesMaxLength) { return []; }LastIndex can be 28, and firstIndex can be 14, which is a valid scenario, but because renderedNodesMaxLength is not ceiled an empty array will be returned. The result is an empty screen with no rendered tree nodes.
Both issues described are easily reproducible in the example app.
fix: do not load whole child collection with virtual scroll (CirclonG…
fix: do not load whole child collection with virtual scroll (#463) (#868
fix: do not load whole child collection with virtual scroll (#463) (#868