OSC Switching Tabs Quicker (Delays)

I’ve noticed recently as my template is growing that switching between tabs lags and incredibly slow. I’m not sure what’s causing this if it’s something in OSC or chrome. I’m not sure what would be causing this delay.

I tried to attach it here but the file is too big (maybe why there is a delay), here is a link from my dropbox.


One thing for sure is that the bigger a session grows, the slower it gets.

However, with 2/3rd of your session file being css strings, you could improve it by avoiding redundancy (css copied over and over) and put the style rules in a theme file. The same goes for static svg images, you can put them in the theme and retrieve them using css custom classes.

I just tried loading your session without the widgets’ css properties, it’s much faster, so there’s probably room for improvement here.

1 Like

Thanks Jean!

I appreciate you taking a quick look and giving me great feedback. I’ll get to work on that and try reducing a lot of my redundancies and create more custom classes.


I spent the last week completely rewriting my template by incorporating a lot of my repeat CSS codes and creating custom classes in a “theme” file as per your suggestions Jean. I was able to decrease the size of my template from about 6+mbs in size to roughly 4.84mbs. I can already see much improvement by decreasing what I did so far. I was wondering if I could do anything else to help reduce my size and help speed up the flow?

I was noticing although my template is a bit bigger the examples OSC templates are only hundreds of KB’s. So, I’m imagining there should be something more I could do to dramatically decrease the size or no?

Looking for some further advice or any other ideas now that I’ve worked on removing a lot of the excess repeats of CSS I had. Which let me know if I could’ve done a better job with how I resolved it.

Here is a link to my template updated and theme.


Nice job ! It seems many widgets now have both a css class declaration and the assocated style in their css field, you could save more space by only leaving the class: my-button; line.

1 Like

Another thing: these dummy buttons are taking both space and processing, if it’s just some kind of grid background you’re after, drawing it with a css background would be more effective.

1 Like

I just found another problem: your session contains multiple widgets of type “root”, it’s not supposed to happen and is likely to be the result of some copy-paste operation. This case will be automatically avoided in next version, but currently it causes some extra processing when switching tabs. The extra roots are in the Sibelius tab.

EDIT: these two widgets where the culprit, removing them reduces the size and loading time dramatically as they both contained an almost entire copy of the session…

1 Like

Thank you Jean! I spent a few hours learning about classes but its been so worth it in the end, and, I find it a lot easier to change, update, and adapt my template using classes instead of changing every individual button. I appreciate the advice and pushing me into that direction. I’ll keep editing and try to get 90% of my template buttons to be only the Class: my_button; only as that will save me so much more.

I appreciate the tip about the dummy buttons and I can easily make a background grid and/or save them in a backup project if I ever need to restore a button in that position.

I just found what you were talking about in the “Sibelius” tab with the two extra root widgets. I definitely copied and pasted that tab and didn’t even notice the root widgets til you mentioned it. After deleting them both all I can say is, WOW! Thank you so much Jean. You’re a life saver from spotting that. I went from 4.84 mbs down to 843 kbs!!! That’s almost 83% reduction in size just by deleting those two weird root widgets that were created.

Thank you once again for spotting those out. My template is back to swift like normal. I’m so glad I posted on the forum as I was scratching my head red trying to figure out what I was doing wrong.


1 Like