Skip to content

Rework throttled refresh#8677

Open
BurningTreeC wants to merge 14 commits intoTiddlyWiki:masterfrom
BurningTreeC:rework-throttled-refresh
Open

Rework throttled refresh#8677
BurningTreeC wants to merge 14 commits intoTiddlyWiki:masterfrom
BurningTreeC:rework-throttled-refresh

Conversation

@BurningTreeC
Copy link
Contributor

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.

@github-actions
Copy link

Confirmed: BurningTreeC has already signed the Contributor License Agreement (see contributing.md)

@BurningTreeC BurningTreeC marked this pull request as ready for review October 14, 2024 05:14
@BurningTreeC BurningTreeC marked this pull request as draft October 15, 2024 16:18
@BurningTreeC BurningTreeC marked this pull request as ready for review October 15, 2024 19:45
@BurningTreeC
Copy link
Contributor Author

This now works and deferres the changes for both styleRefresh and mainRefresh in both the main window and new windows

@BurningTreeC
Copy link
Contributor Author

@Jermolene @pmario @saqimtiaz here's a build with performance instrumentation enabled:

https://rework-throttled-refresh.tiddlyhost.com/

@pmario
Copy link
Member

pmario commented Oct 16, 2024

... here's a build with performance instrumentation enabled:

Seems to be slightly faster than the tiddlywiki/prerelease

@Leilei332

This comment has been minimized.

@BurningTreeC
Copy link
Contributor Author

Actually I wonder why opening $:/TagManager and $:/Manager is especially slow when there are many tiddlers or tags.

Hello @Leilei332 - do you notice this in general or in this PR?

@Leilei332

This comment has been minimized.

@Leilei332

This comment has been minimized.

@Jermolene
Copy link
Member

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.

@Leilei332 Leilei332 mentioned this pull request Jun 6, 2025
@netlify
Copy link

netlify bot commented Aug 8, 2025

Deploy Preview for tiddlywiki-previews ready!

Name Link
🔨 Latest commit b8868c8
🔍 Latest deploy log https://app.netlify.com/projects/tiddlywiki-previews/deploys/6896dbcc46aa0e0009ba7632
😎 Deploy Preview https://deploy-preview-8677--tiddlywiki-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2525.0 KB
PR 2529.9 KB

Diff: ⬆️ Increase: +5.0 KB

@BurningTreeC
Copy link
Contributor Author

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.

Hi @Jermolene , I believe I did just that

Comment on lines +10 to +11
/*jslint node: true, browser: true */
/*global $tw: false */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments are also not needed now.

@pmario pmario added the needswork PR that cannot yet be merged; Issue that is "almost" actionable label Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needswork PR that cannot yet be merged; Issue that is "almost" actionable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants