[Scummvm-tracker] [ScummVM :: Bugs] #14853: COMMON: Rework path handling causes performance regression

ScummVM :: Bugs trac at scummvm.org
Fri Jan 12 22:16:05 UTC 2024


#14853: COMMON: Rework path handling causes performance regression
--------------------+------------------------------------
Reporter:  mikrosk  |      Owner:  (none)
    Type:  defect   |     Status:  new
Priority:  normal   |  Component:  Common
 Version:           |   Keywords:  performance,regression
    Game:           |
--------------------+------------------------------------
 https://github.com/scummvm/scummvm/pull/5467 introduced a new (safer) way
 how to handle file paths.

 I was looking forward to this change because I tested its early iteration
 and it brought quite visible speedup when adding new games.

 Surprisingly, when the dust settled after the 2.8.0 release we have found
 out that our Atari backend regressed in master: adding a game with a lot
 of files (e.g. Dreamweb with ~100 files) could lead to nearly twice as
 slow game detection.

 Some numbers:

 Atari backend, attempting to add a folder with 1000 generated files:
 - 2.8.0: 33s
 - master: 58s

 Linux SDL backend, attempting to add a folder with 100 000 generated files
 (''"for i in $(seq 99999); do touch $(printf "%04d" $i); done"''):

 - 2.8.0: 17s
 - master: 28s

 Naturally, no game is going to have 100 000 files, this is just to
 demonstrate that the powerful CPU can hide even a performance drop to 60%
 of the original speed.

 Fortunately, thanks to LP's responsible approach, each commit is
 compilable and testable: so in this case the offending commit is
 https://github.com/scummvm/scummvm/commit/645a35c0 (not so surprising as
 it directly manipulates the detection code).
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/14853>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list