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

Extra networks UI optimize #230

Closed

Conversation

vladmandic
Copy link
Owner

@vladmandic vladmandic commented Apr 19, 2023

@vladmandic
Copy link
Owner Author

@space-nuko any chance you might create a new pr or update this one so there is no merge conflict? if not, i'll have to go through conflict resolution during merge and its messy since pr originated for a different fork.

@anapnoe
Copy link

anapnoe commented Apr 24, 2023

there should be a global approach-remedy for accordions destructive behavior that impacts performance layout and internal update I have created a function that applies to all instances and only called once to cache the contents, then it uses the hidden property as it was in previous version of gradio I was thinking doing the same with the dropdown fields you can check ui.js
lines 645-672 for this solution the idea is that we try to patch gradio bugs on the frontend where possible without adding extra buttons or functions to the backed as for defer loading see here most browsers are supporting native lazy loading we just add an attribute to img tag loading="lazy" no need an option for this
source for browser support https://gtmetrix.com/defer-offscreen-images.html

@space-nuko
Copy link
Contributor

space-nuko commented Apr 24, 2023

Just in case you weren't aware there's performance impact if gradio sends a huge initial HTML bundle when the user connects, for example in the case of the user having thousands of LoRAs this can be upwards of 15 seconds. And this can even cause timeouts on server startup because gradio internally checks for connectivity on its own listen address, and if that times out (because of how long it takes to reify the extra networks HTML) it just exits the process entirely

@anapnoe
Copy link

anapnoe commented Apr 24, 2023

yes I am aware I am not against paging just noted that defer loading of images aka lazy loading can improve even further the performance and the global approach for accordion that will work for existing extensions that haven't been updated and in all cases that is exists and may cause issues like removing the custom attached listeners in the contents of accordion when it is closed

@vladmandic
Copy link
Owner Author

closing this pr as @anapnoe is working on alternative/more-generic approach.

@vladmandic vladmandic closed this May 3, 2023
midcoastal pushed a commit to midcoastal/automatic that referenced this pull request Dec 7, 2023
along with new keybind functionality for quick jumping between sections.
Closes vladmandic#230
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

Successfully merging this pull request may close these issues.

3 participants