-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Rework throttled refresh #8677
base: master
Are you sure you want to change the base?
Rework throttled refresh #8677
Conversation
Confirmed: BurningTreeC has already signed the Contributor License Agreement (see contributing.md) |
This now works and deferres the changes for both styleRefresh and mainRefresh in both the main window and new windows |
@Jermolene @pmario @saqimtiaz here's a build with performance instrumentation enabled: |
Seems to be slightly faster than the tiddlywiki/prerelease |
Actually I wonder why opening |
Hello @Leilei332 - do you notice this in general or in this PR? |
This is a general problem in tiddlywiki. In this PR it is a little quicker. Tag Manager (PR):
Tag Manager (prerelease):
Manager (PR):
Manager (prerelease):
|
Thanks @BurningTreeC this is promising, but I don't think we're ready to include it in v5.3.6. One issue is that the code of render.js is now pretty gnarly and hard to follow. I think we need to consider refactoring the rendering and refreshing into a generic class that can be used both for styles and body content. In a separate branch I've been exploring the idea with a new "wikifier" class. See this commit. It will need to be extended to allow it to replace all the occurrences of rendering/refreshing in the system. |
This PR reworks the throttled refresh so that it works for the styleRefresh, too.
It adds two switches so that we can control if we want only the styleRefresh to throttle or only the mainRefresh to throttle.
It also makes the styleRefresh in new Windows equal to the styleRefresh in the main window.
Also in new windows the throttling is added, the same way as in the main window.