<p>Adding a config option to disable the thing browsers is a sensible workaround for now, except it doesn't work for the spriteset editor, and slow menus still need fixing.<br>
And the map browser is also a problem. Bird and Chalkflower have both complained about the lag when a minimap for a large map is rendered on a slow computer. (There is already a config option to set how large a map has to be before rendering its minimap is delayed for a split second after it's selected in the browser.)</p>
<p>Anyway, there are multiple different types of slowness:<br>
-the framerate while in the browser<br>
-the delay when entering the browser<br>
-the delay when entering the browser for the first time after loading the game</p>
<p>And there are <em>many</em> different reasons for slowness, including but not limited to:<br>
-drawing lots of slices<br>
-reading lots of data records<br>
-opening and closing a file for each data record loaded (no problem on Unix, extremely slow on Windows)<br>
-loading sprites into the cache the first time they're acc<br>
-reading default palettes for sprites, which aren't cached<br>
-laying out the children of a layout slice<br>
-yes, rendering text is actually pretty slow (relevant for huge help pages)<br>
-rendering minimaps<br>
-scaling-down backdrops when entering the backdrop picker</p>
<p>It's not clear whether you were talking about framerate, or loading time. I think loading time is the main problem, but this post is about framerate.<br>
As for lazy loading, I think that might be a solution for loading times. But is one of the most complicated solutions, and might not be needed.</p>
<p>Testing with an old copy of POWERXE and a release build on x86 linux and a slow 8 year old AMD CPU.</p>
<p>Looking at the walkabout spriteset browser (1075 walkabouts):<br>
-Loading the first time takes ~4 seconds, subsequently takes ~1/3s<br>
-Laying out the layout slice each tick takes 0.1ms<br>
-I get 31fps fullscreen (1920x1080, 2x zoom) without speedcontrol<br>
Looking at the textbox browser (9425 textboxes):<br>
-Loading takes ~2/3s<br>
-Laying out the layout slice takes about 1.2ms<br>
-10 fps fullscreen<br>
And all other browsers are very fast (>100fps)</p>
<p>So, the obvious problem is drawing lots of slices that don't need to be drawn, because they're off-screen. This is an easy fix: don't draw slices that are off-screen. If they are clipping, then we know they can't have visible descendants, but I'd like to also add a new Slice bool to make that assumption without needing to clip.</p>
<p>Results after:<br>
Walkabout spriteset browser:<br>
-56fps fullscreen (disappointing!)<br>
Textbox browser:<br>
-51fps fullscreen</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/ohrrpgce/ohrrpgce/issues/1?email_source=notifications&email_token=AMWGWZX3UGKH3W2ZZF6PFFTQB35ULA5CNFSM4H7GPAR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3A42DA#issuecomment-516017420">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AMWGWZSZSG77Z2EMM2RZWGTQB35ULANCNFSM4H7GPARQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AMWGWZVHOTONQSEXVWPFPN3QB35ULA5CNFSM4H7GPAR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3A42DA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/ohrrpgce/ohrrpgce/issues/1?email_source=notifications\u0026email_token=AMWGWZX3UGKH3W2ZZF6PFFTQB35ULA5CNFSM4H7GPAR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3A42DA#issuecomment-516017420",
"url": "https://github.com/ohrrpgce/ohrrpgce/issues/1?email_source=notifications\u0026email_token=AMWGWZX3UGKH3W2ZZF6PFFTQB35ULA5CNFSM4H7GPAR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3A42DA#issuecomment-516017420",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>