News:

If you are a developer, please build MegaGlest on your own and get in touch to contribute (or post your patches on the forums).

Main Menu

Massive Lag on Screenshot

Started by Omega, 27 September 2010, 22:15:45

Omega

When taking a screenshot (default: 'e' key) on GAE 0.3, the game freezes for several seconds before resuming. It did not do this before, and usually was a very fast instant picture. The freezing, abet, temporary, interupts gameplay for several seconds.

No known ideas for cause, though it seemed to appear with every screenshot, regardless of where or the map used. (default 1024x768 resolution).
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

hailstone

#1
Looks like silnarm fixed it in revision 819, 0.3.1.

Quote from: http://glestae.svn.sourceforge.net/viewvc/glestae?view=revision&revision=819
fix ultra slow screenshot capture on windoze

The fix is to store the pixels in a buffer then write them to the file in one go instead of writing to the file for every component (RGB) of every pixel. Disk IO is one of the slower activities to do so having it try to access the file that many times (1024x768x3 = 2359296) would be slow.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Yggdrasil

Physfs causes this as it adds some overhead to every io operation. As hailstone said there are really many of them.