Skip to content

Improve zoom performance in Script and Shader editors #106117

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jaydensipe
Copy link
Contributor

@jaydensipe jaydensipe commented May 6, 2025

This improves the zoom performance when you have multiple (previously) opened scripts in the script/shader text editors. This was done by deferring the expensive set_zoom_factor (and subsequent cache invalidation) function calls to only be called when you open a script.

This was previously updated N * scroll wheel spins times for each script you had opened; this was done to keep the zoom percentage in sync between scripts, but is now updated and stored in the script/shader editor plugins instead.

Warning

Zooming can still stutter on bigger and/or first-time opened scripts due to cache invalidation within that single code editor instance. Further work could be done to improve this.

Before After
Screen.Recording.2025-05-06.024642.mp4
Screen.Recording.2025-05-06.024518.mp4

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

Successfully merging this pull request may close these issues.

2 participants