[Ohrrpgce] [ohrrpgce/ohrrpgce] Some browsers are unusably slow in large games or slow computers (#1)

Ralph Versteegen notifications at github.com
Mon Jul 29 07:33:41 PDT 2019


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.
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.)

Anyway, there are multiple different types of slowness:
-the framerate while in the browser
-the delay when entering the browser
-the delay when entering the browser for the first time after loading the game

And there are *many* different reasons for slowness, including but not limited to:
-drawing lots of slices
-reading lots of data records
-opening and closing a file for each data record loaded (no problem on Unix, extremely slow on Windows)
-loading sprites into the cache the first time they're acc
-reading default palettes for sprites, which aren't cached
-laying out the children of a layout slice
-yes, rendering text is actually pretty slow (relevant for huge help pages)
-rendering minimaps
-scaling-down backdrops when entering the backdrop picker

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.
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.

Testing with an old copy of POWERXE and a release build on x86 linux and a slow 8 year old AMD CPU.

Looking at the walkabout spriteset browser (1075 walkabouts):
-Loading the first time takes ~4 seconds, subsequently takes ~1/3s
-Laying out the layout slice each tick takes 0.1ms
-I get 31fps fullscreen (1920x1080, 2x zoom) without speedcontrol
Looking at the textbox browser (9425 textboxes):
-Loading takes ~2/3s
-Laying out the layout slice takes about 1.2ms
-10 fps fullscreen
And all other browsers are very fast (>100fps)

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.

Results after:
Walkabout spriteset browser:
-56fps fullscreen (disappointing!)
Textbox browser:
-51fps fullscreen

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ohrrpgce/ohrrpgce/issues/1#issuecomment-516017420
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20190729/6a981b59/attachment.html>


More information about the Ohrrpgce mailing list