Hi there ,
I make screenshots of every game and so have more than 10000 screens atm.
this issue with gamefreeze while making a screenshot appears around 500 to 700 screens in the screenshot folder and then stays further on. It only happens for the first screenshot of the session of MWO.
Does MWO first an indexing of the folder so it knows which number the screen gets?
It would be better to save this info in a seperate file in the folder.
Btw. every profile on the same PC has the same screenshot folder? its not under the profile, so sorting different user-screens is a mess...
Minor bug - not game threatening but annoying with lots of screens


First Screenshot: Game Frozen For >5 Seconds
Started by Rentier, Aug 19 2015 07:38 AM
Issue Feedback
2 replies to this topic
#1
Posted 19 August 2015 - 07:38 AM
#2
Posted 19 August 2015 - 11:40 AM
Hi,
I'm a programmer myself and I guess the issue is not directly caused by MWO.
To write a file into a directory, MWO has to ask the operating system (windows) for a handle that can then be used to access the newly generated file.
It'd look like this:
MWO: hey, windows, please create a new file for me at c:\wmo\screen\2015-08-19_superscreen.png
Windows: yep, done, here is your file hande
(the file will be empty by that point but existing)
MWO: windows, please write the data (010000011...) into the file with the handle you just gave me
Windows: ok, done
(at that point the screenshot is written)
MWO: windows, please close the file handle
Windwos: done
(the file is closed and we are done)
It is generally known, that a large number of files in a single directory can cause severe performance issues then accessing the directory. Even without trying to list all the files it contains. (Windows has to list all the files in this case since we have to check if the filename isn't already used)
Why it only happens the first time you save a screen might be related to some caching mechanism of windows, though I am not sure about that.
While all this does not solve the problem, maybe it helps to understand what might be happening to cause the issue.
I'd suggest to move your screenshots to a seperate directory after each session to keep it clean. Should avoid the problem.
Yours SirCotare
I'm a programmer myself and I guess the issue is not directly caused by MWO.
To write a file into a directory, MWO has to ask the operating system (windows) for a handle that can then be used to access the newly generated file.
It'd look like this:
MWO: hey, windows, please create a new file for me at c:\wmo\screen\2015-08-19_superscreen.png
Windows: yep, done, here is your file hande
(the file will be empty by that point but existing)
MWO: windows, please write the data (010000011...) into the file with the handle you just gave me
Windows: ok, done
(at that point the screenshot is written)
MWO: windows, please close the file handle
Windwos: done
(the file is closed and we are done)
It is generally known, that a large number of files in a single directory can cause severe performance issues then accessing the directory. Even without trying to list all the files it contains. (Windows has to list all the files in this case since we have to check if the filename isn't already used)
Why it only happens the first time you save a screen might be related to some caching mechanism of windows, though I am not sure about that.
While all this does not solve the problem, maybe it helps to understand what might be happening to cause the issue.
I'd suggest to move your screenshots to a seperate directory after each session to keep it clean. Should avoid the problem.
Yours SirCotare
#3
Posted 19 August 2015 - 12:23 PM
SirCotare, on 19 August 2015 - 11:40 AM, said:
Thx for this, but that i know (i'm a spare-time programmer myself)
what is puzzling me is that only the first write in the directory is so slow - every other screenshot is made in miliseconds
and yes I do move the screens after getting in that range

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users