We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Was trying to use webtreemap on a listing that 500,000 files and found that it was hanging in treeify
treeify
Was able to speed it up so that it finished in a few seconds, in particular: https://github.com/danvk/webtreemap/blob/master/src/tree.ts#L43-L50 can be changed
from
f (!t.children) t.children = []; let child = t.children.find(c => c.id === id); if (!child) { child = {id, size: 0}; t.children.push(child); }
to
f (!t.children) { t.children = []; t.childMap = {}; } let child = t.childMap[id]; if (!child) { child = {id, size: 0}; t.children.push(child); t.childMap[id] = child; }
Of course, it would be good to also clean up the childMap before serialization is called.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Was trying to use webtreemap on a listing that 500,000 files and found that it was hanging in
treeify
Was able to speed it up so that it finished in a few seconds, in particular: https://github.com/danvk/webtreemap/blob/master/src/tree.ts#L43-L50 can be changed
from
to
Of course, it would be good to also clean up the childMap before serialization is called.
The text was updated successfully, but these errors were encountered: