Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#6983 closed defect (fixed)

SWORD25: long saving time

Reported by: SF/mimdoe Owned by: sev-
Priority: high Component: Engine: Sword25
Keywords: Cc:
Game: Broken Sword 2.5

Description

It takes 15 second to save the game (from clicking on slot to completing the save). When I play the game outside of ScummVM, saving is without any delay.

ScummVM from December 9 16.20
BS English version
WinXP SP3, Core2DuoE6750

Ticket imported from: bugs/6983.

Attachments (1)

sword25-1.000 (466.7 KB) - added by SF/mimdoe 3 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 3 years ago by Strangerke

Priority: normalhigh

comment:2 Changed 3 years ago by Strangerke

It would be nice to fix it before the release of 1.8.0. Raising priority.

comment:3 Changed 3 years ago by wjp

Does this still happen for you?

comment:4 Changed 3 years ago by wjp

And if it does, does it happen right from the start of the game? Or only after playing some time?

comment:5 Changed 3 years ago by SF/mimdoe

Yes, it still happens and right from the start of the game.

comment:6 Changed 3 years ago by RichieSams

Can you confirm this still happens when using the latest daily build? What are the file sizes of the savegames?

In my tests, saves are about 1-2 seconds. But I will do some profiling to find out more

comment:7 Changed 3 years ago by SF/mimdoe

Yes, it is the same in Feb 5 2016 9:53 build. The savegames size: 466kB, 489kB, 488kB. 13 seconds saving time now with stopwatch.

comment:8 Changed 3 years ago by RichieSams

Thank you for the update. Can you attach one of the savegames?

Changed 3 years ago by SF/mimdoe

Attachment: sword25-1.000 added

comment:9 Changed 3 years ago by SF/mimdoe

Yes, the savegame attached.

comment:10 Changed 3 years ago by sev-

Owner: set to sev-
Resolution: fixed
Status: newclosed

comment:11 Changed 3 years ago by sev-

Fixed. It was combination of poor reallocation strategy in ScummVM and poor memory management in Windows.

During the save we were reallocating 15.5GB of memory, which was a single save growing from 3 bytes to 1.2MB.

Now after fix we are reallocating 4.5MB, e.g. 300 times less.

Note: See TracTickets for help on using tickets.