Opened 4 months ago
Last modified 4 months ago
#15279 new defect
SCI: Some Macintosh games are very slow to start — at Initial Version
Reported by: | eriktorbjorn | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | Engine: SCI |
Version: | Keywords: | ||
Cc: | Game: |
Description
I've noticed that the Macintosh versions of Leisure Suit Larry 6 and 7 take a long time to start in ScummVM. Particularly the first time. Subsequent startups are faster, presumably because the operating system has cached the files it's reading.
But the first time it was slow enough that I thought for sure that ScummVM had locked up somehow.
The problem seems to be ResourceManager::readResourcePatchesBase36()
, where it loops through a bunch of files, patching them somehow. For Leisuire Sute Larry 6, it goes through 4,917 files. For Leisure Suit Larry 7, it's 3,807. Would it be possible to do this processing on demand, rather than all in advance, or something like that?
I have Macintosh versions of Phantasmagoria 1 and Gabriel Knight 2, but I don't know how to install those for ScummVM so I haven't tested if they're similarly slow to start.
Also, is there any purpose to this part of the function?
// Check for SOL as well tag = (tag << 16) | stream->readUint16BE(); if (tag != MKTAG('S','O','L',0)) { delete stream; continue; } delete stream;