ThumbnailPrealloc=200000000 does not prealloc 200MB/190MiB

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

ThumbnailPrealloc=200000000 does not prealloc 200MB/190MiB

Post by *JOUBE »

ThumbnailPrealloc=200000000 does not prealloc 200MB/190MiB. But there is a maximum of about 1,500,000 bytes. This should be revised nowadays.

Joube
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: ThumbnailPrealloc=200000000 does not prealloc 200MB/190MiB

Post by *ghisler(Author) »

I don't limit the size in any way. Here is what I call:

Code: Select all

          res:=pRootStg.CreateStream('prealloc',mode,0,0,pFileStream);
          if succeeded(res) then begin
            pFileStream.SetSize(preallocSize);
            pFileStream.Release;
          end;
          pRootStg.DestroyElement('prealloc');
Author of Total Commander
https://www.ghisler.com
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6495
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: ThumbnailPrealloc=200000000 does not prealloc 200MB/190MiB

Post by *Horst.Epp »

Preallocating the file doesn't prevent it to grow above that size.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: ThumbnailPrealloc=200000000 does not prealloc 200MB/190MiB

Post by *ghisler(Author) »

Moderator message

Moved to "will not be changed"
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: ThumbnailPrealloc=200000000 does not prealloc 200MB/190MiB

Post by *JOUBE »

ghisler(Author) wrote: 2023-07-12, 09:30 UTC Moved to "will not be changed"
2ghisler(author)
That's not ok, I've been away from home for 2 days and can't take care of it, it's already been postponed in "will not be changed". You may not change this, but it's still a bug. And it stays buggy unless you change it.

Unfortunately, as I said, I was only able to test it now with a fresh.ini. The maximum size when creating is 1.5 MB. This is annoying and slows everything down a lot. My previous database was 3 GB and I had to delete it because I had changed the size of the thumbs (from 96x96 to 168x168). The size of 1.5MB is reached almost immediately and then the enlargement starts, which is annoyingly slow.

So please, test it yourself and annoy yourself with this error.

So move this thread back to the bug forum.

joube

I'll happily grant you one thing, everyone can survive it even if you don't change it. but I will be annoyed about Tc11 in the near future (until all pictures are saved as thumbs again (like I said 3GB)).

Incidentally, what Horst.Epp wrote has nothing to do with the matter and is completely off topic.

I suspect it might be a limitation of the database routines, please test it out.

J.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: ThumbnailPrealloc=200000000 does not prealloc 200MB/190MiB

Post by *ghisler(Author) »

As I wrote above, I call the function with the user-defined size, but Windows seems to ignore it.
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: ThumbnailPrealloc=200000000 does not prealloc 200MB/190MiB

Post by *JOUBE »

OK, I can deal with. Thanks for looking in the sources and checking it.
Post Reply