Skip to content
New issue

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

webclient crash on importing huge libraries #488

Open
MMeent opened this issue Mar 30, 2016 · 1 comment
Open

webclient crash on importing huge libraries #488

MMeent opened this issue Mar 30, 2016 · 1 comment

Comments

@MMeent
Copy link

MMeent commented Mar 30, 2016

When importing huge libraries (10k+ files, 400+albums, 1000+artists), the webclient may freeze and crash the browser (FF40+). This happens because every library update requests a DOM update in the client, and the rendering is not finished by the time the next song is scanned and added to the library.

I suggest updates from the filesystem to be clustered and pushed only every x (milli) seconds (configurable?), and the client to only update it's tree after it has finished rendering the new tree. I also suggest to use a smart DOM update library that doesn't try to update a part of the DOM that has not changed, like React or DomChanger.

@MMeent
Copy link
Author

MMeent commented Mar 31, 2016

This may be somewhat related to #164. The DOM update scripts, however, currently dirty all the dom elements in the library except for the container element, and also re-builds the expanded elements every update.

This is what I found:

The function renderLibrary() at line 1922 of app.js does indeed preserve most direct child DOM elements of the libraryArtistsDom, but only the first elements are kept. Every DOM update the contents of those child's childs are reset, classes are changed and possibly changed back, and expanded elements are deleted and possibly re-created. (respectively lines 1960, 1958 and 2165 by call in 1981, and lines 1963 ... 1965 and 2018 ... 2119 of app.js at master)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant