The question came up in another thread and is interesting for my projects:
In my ongoing project (Tix) I have one master stylesheet tiddler and a dozen more for “parts” and “elements” as well as effects users can apply to them. And up to another dozen just to hide optional stuff. All in all that makes up to 25 stylesheet tiddlers depending on the user’s configuration. Many of them can be switched on or off via a checkbox that sets the $:/tags/Stylesheet tag.
Question: Would it improve performance, if I for example used another tag and flitered all those stylesheed parts together in one single “real” stylesheet tiddler tagged $:/tags/Stylesheet?
TW would then only have to apply one stylesheet per refresh instead of 20. But it would have to evaluate a filter to collect the 20 pieces.
I don’t expect it to make a noticeable difference on fast hardware, but is there a reasonable limit for such setups?
In my former project Bricks — CSS Construction Set for TiddlyWiki 5 there were about 80 pieces of rather dynamic CSS using lots of variables. So there my coice was obvious and I built a “generator” that compiles the pieces into one static stylesheet that performs noticeably better.
Thanks and all the best,