Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#6983 closed defect (fixed)

SWORD25: long saving time

Reported by: SF/mimdoe Owned by: sev-
Priority: high Component: Engine: Sword25
Version: 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 9 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by Strangerke, 9 years ago

Priority: normalhigh

comment:2 by Strangerke, 9 years ago

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

comment:3 by wjp, 9 years ago

Does this still happen for you?

comment:4 by wjp, 9 years ago

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

comment:5 by SF/mimdoe, 9 years ago

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

comment:6 by RichieSams, 9 years ago

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 by SF/mimdoe, 9 years ago

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 by RichieSams, 9 years ago

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

by SF/mimdoe, 9 years ago

Attachment: sword25-1.000 added

comment:9 by SF/mimdoe, 9 years ago

Yes, the savegame attached.

comment:10 by sev-, 9 years ago

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

comment:11 by sev-, 9 years ago

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.