-
Notifications
You must be signed in to change notification settings - Fork 326
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
a high number of untracked files make the extension and jupyter lab unresponsive #667
Comments
Maybe the same as #663? Thanks for reporting @pfarndt, I also find that if I create 10000 empty files in a git repository then the entire UI slows to an unusable ~0 fps. I guess this is happening because every single file gets rendered into the changes tab no matter how many there are. I saved the firefox performance monitor of this: profile.zip and its lots and lots of jupyterlab-git/src/components/FileList.tsx Line 496 in 6169af0
first refresh status is with 1000 files, second with 10000. Is it easy to detect if a react component will be visible or not and only render it if you scroll onto it? Also I don't think the status call is at fault because when I run
Though if you add: import time
time.sleep(5) to the python status function then select parts of the ui are severely slowed down - making a new folder in the filebrowser, running notebook cells, etc. The connecting theme being things that require the jupyter server to work. |
@pfarndt unfortunately right now, you only have two possibilities:
Thanks @ianhi for the analysis. Could you look at the response size of the status request for such a big number of files? This also impact the responsiveness of the server. The solution you are looking for if you want to push a PR is called virtualization. More specifically I would suggest the following package react-window. |
I did some more tests:
Hope that helps to pinpoint the problem. |
For context,
Looking at the short call time (<1s) and large size (17M) of the output, I think this has more to do with how long it takes to send that large of a payload over the network. |
I think two things are happening:
react-window seems to solve the first issue. As for the second issue maybe we could compress with zlib (python builtin) and then decompress on the typescript side using pako. Though it would be good to determine if that is worth it - i.e. characterize the slowdown as a function of message size. |
I assume we're referring to the list of changed files in the Git tab of the left pane. If so, it may be worth noting that the performance issue occurs even if the Git tab is not open.
To clarify, is this something that's already done / being worked on or is it a proposal to use it?
Sounds like a good idea considering how compressible the payload likely is. |
I think the panel is being rendered in the background as there are no checks in the render method to see if the sidebar tab is open: jupyterlab-git/src/components/GitPanel.tsx Lines 167 to 180 in 103ea8d
Right now I think it is primarily a proposal. I started working on this a while ago (branch here) but never finished as my lab started re-opening and I didn't/don't know enough about react to implement it quickly. If anyone wants to pick this up they are more than welcome to. |
This also happens when there are a large number of files in the staging area. For e.g., download a data set into In general, the extension needs to gracefully handle these scenarios rather than making the whole UI unusable. |
I agree with the previous post. I think "gracefully" could very well mean that only a few (say the 20 most recently changed) files are listed (together with a remark that this list is actually longer). This way the UI is not blocked. Users anyway do not want to add/manage hundreds of files using the GUI and would use the git CLI instead. Probably this is easier to implement. |
I am facing the same issue, my jupyter lab running on chrome is unresponsive after i clicked on the option to initialise a repository. The whole UI is not unresponsive, Is there any way to kill this command and make the UI usable again? |
@talal-sen could you open a new issue with more information - in particular running in debug mode and reporting the messages. |
I have a repo with a lot (10 000+) untracked files (mostly intermediate figures and tables I do not need to track, not excluded through a .gitignore) which get listed in the corresponding section of the UI but make the extension and the whole jupyter lab unresponsive.
Is there any remedy?
The text was updated successfully, but these errors were encountered: