Unnecessary font cache rebuild when copying save code after program start

What did you draw?
Post Reply
Stargate38
Posts: 64
Joined: Thu Aug 15, 2013 3:06 pm
Location: Visible Universe
Contact:

Unnecessary font cache rebuild when copying save code after program start

Post by Stargate38 » Sun Jun 14, 2020 4:00 pm

Since a few versions back, I noticed that GSim triggers a font cache rebuild when copying the save code for the first time (after starting the program). This is not necessary, and on my system, it makes GSim freeze for several seconds while it's loading every single font installed on my system. The problem still exists in 3.0.2, and I think a persistent font cache (one that's only updated when fonts are added/removed from the Windows Fonts folder, not after every program restart) should be implemented. Here's the steps to reproduce the issue on Windows 10 1909 64-bit with GSim 3.0.2:

1. Install a bunch of fonts (unless you already have a lot of them)
2. Start GSim.
3. Click Build (continue to Step 4) or Load from Code (skip to Step 5)
4. Click the Save/Load button on the top left sidebar.
5. Select any simulation (doesn't matter which)
6. Select all and press Ctrl+C.

The program should freeze for several seconds, during which nothing is copied until the font cache is rebuilt.
I LOVE your Gravity Simulator! :)

User avatar
testtubegames
Site Admin
Posts: 1068
Joined: Mon Nov 19, 2012 7:54 pm

Re: Unnecessary font cache rebuild when copying save code after program start

Post by testtubegames » Fri Jun 19, 2020 10:25 pm

Thanks for sharing that - I'll take a look!

Post Reply