Slideshow random jumps are limited to 32K.
Moderators: helmut, XnTriq, xnview
Slideshow random jumps are limited to 32K.
I make a slideshow sequence with 50000-80000 files.
I set "Use random order" checkbox.
When slideshow starts, it jumps only within first 32000 files.
PageUp/PageDown is OK, I can choose any image this way.
I think the problem is in the function you are using to jump to a random image. Looks like you are using integer, not Long or something.
The second problem is speed.
It takes a veeery long time to load some huge slideshow (as above).
Is there some ability to increase the speed? Maybe avoiding many disk reads (IO operations) would make some sence?
Thanks, Fuhrer
<-- removed* -->
My System is:
Windows XP SP3.
Celeron 420 @ 1.6 Ghz
3GB Ram.
<-- * E-mail address removed by moderator (see “Rules and Guidelines”) -->
I set "Use random order" checkbox.
When slideshow starts, it jumps only within first 32000 files.
PageUp/PageDown is OK, I can choose any image this way.
I think the problem is in the function you are using to jump to a random image. Looks like you are using integer, not Long or something.
The second problem is speed.
It takes a veeery long time to load some huge slideshow (as above).
Is there some ability to increase the speed? Maybe avoiding many disk reads (IO operations) would make some sence?
Thanks, Fuhrer
<-- removed* -->
My System is:
Windows XP SP3.
Celeron 420 @ 1.6 Ghz
3GB Ram.
<-- * E-mail address removed by moderator (see “Rules and Guidelines”) -->
Re: Slideshow random jumps are limited to 32K.
And when you don't use random, no problem?Fuhrer wrote:I make a slideshow sequence with 50000-80000 files.
I set "Use random order" checkbox.
When slideshow starts, it jumps only within first 32000 files.
PageUp/PageDown is OK, I can choose any image this way.
I think the problem is in the function you are using to jump to a random image. Looks like you are using integer, not Long or something.
Perhaps it's because the EXE is very very big, so OS need some times to load itThe second problem is speed.
It takes a veeery long time to load some huge slideshow (as above).
Is there some ability to increase the speed? Maybe avoiding many disk reads (IO operations) would make some sence?
Pierre.
Re: Slideshow random jumps are limited to 32K.
No problem that way, like I sad:xnview wrote: And when you don't use random, no problem?
The same no problem in automatic mode: it just loads next image. The problem appears only in random mode, either automatic, or keyboard/mouse. It just doesn't jump to image who's index is over 32768.Fuhrer wrote:PageUp/PageDown is OK, I can choose any image this way.
No, really. Exe size means nothing if your antivirus doesn't try to scan it all every time you start it. I don't have antivirus, so EXE size doesn't matter for me. Indeed, 0.5 GB slideshow (500 megabytes, 170 jpegs in it) starts in about 1 or 2 seconds. That's fast.xnview wrote:Perhaps it's because the EXE is very very big, so OS need some times to load itMaybe avoiding many disk reads (IO operations) would make some sence?
I was talking about on-line slideshows, those that run directly using XnView, not by the created EXE. The loading time is measured from the moment when I open some big slide-show sequence (*.sld) till the moment when I can start it. If slideshow is big enough (100000 photos), it takes a few minutes to load.
Actually, I was wrong - XnView doesn't make disk reads during that "hung" state. It makes some internal IO's. Maybe filling listbox slows down? Anyway, loading big slideshows takes nearly longer, then creating new ones.
Re: Slideshow random jumps are limited to 32K.
And the list of files in the slideshow dialog is correct?Fuhrer wrote: The same no problem in automatic mode: it just loads next image. The problem appears only in random mode, either automatic, or keyboard/mouse. It just doesn't jump to image who's index is over 32768.
Ok, please try the 1.94 beta 2 when will be available...xnview wrote:No, really. Exe size means nothing if your antivirus doesn't try to scan it all every time you start it. I don't have antivirus, so EXE size doesn't matter for me. Indeed, 0.5 GB slideshow (500 megabytes, 170 jpegs in it) starts in about 1 or 2 seconds. That's fast.xnview wrote:Perhaps it's because the EXE is very very big, so OS need some times to load itMaybe avoiding many disk reads (IO operations) would make some sence?
I was talking about on-line slideshows, those that run directly using XnView, not by the created EXE. The loading time is measured from the moment when I open some big slide-show sequence (*.sld) till the moment when I can start it. If slideshow is big enough (100000 photos), it takes a few minutes to load.
Actually, I was wrong - XnView doesn't make disk reads during that "hung" state. It makes some internal IO's. Maybe filling listbox slows down? Anyway, loading big slideshows takes nearly longer, then creating new ones.
Pierre.
Re: Slideshow random jumps are limited to 32K.
It Seems to be Ok, dont see any problem there.xnview wrote: And the list of files in the slideshow dialog is correct?
A bit better, but still not good. Just one more thins to do.xnview wrote: Ok, please try the 1.94 beta 2 when will be available...
In short: do not use "Random()*Random()", just use "Random()". If it's clear, then just don't read the rest.
In long: the next explain.
Let us say our random() function returns number from 0 to 1. Of cource, the statistical average vill be 0,5. That means that if you add a hundred of random nubrers you'll get some number around 50.
But for the same reason "random()*random()" will give us an average of 0,25. In practice this means that most of pictures will be selected from the fist quater of the whole range, much less out of the secong quarter, and very few from the second half. Maybe it will be more clear in the graphic.
[img=http://i.piccy.kiev.ua/i2/0b/11/5ca8d63 ... 0cd38.jpeg]
The Testing condition was:
100071 jpeg in slide-show
60 random pics taken as reference.
Re: Slideshow random jumps are limited to 32K.
The test was for this bugAnonymous wrote:A bit better, but still not good. Just one more thins to do.xnview wrote: Ok, please try the 1.94 beta 2 when will be available...
I was talking about on-line slideshows, those that run directly using XnView, not by the created EXE. The loading time is measured from the moment when I open some big slide-show sequence (*.sld) till the moment when I can start it. If slideshow is big enough (100000 photos), it takes a few minutes to load.
Sorry but i don't understand. All pictures will be shown once per random "session". I don't use random each time when showing a picture.In short: do not use "Random()*Random()", just use "Random()". If it's clear, then just don't read the rest.
In long: the next explain.
Let us say our random() function returns number from 0 to 1. Of cource, the statistical average vill be 0,5. That means that if you add a hundred of random nubrers you'll get some number around 50.
But for the same reason "random()*random()" will give us an average of 0,25. In practice this means that most of pictures will be selected from the fist quater of the whole range, much less out of the secong quarter, and very few from the second half. Maybe it will be more clear in the graphic.
Pierre.
Re: Slideshow random jumps are limited to 32K.
Oh, sorry! It's my fault (2 problems in one topic).xnview wrote:The test was for this bugAnonymous wrote:A bit better, but still not good. Just one more thins to do.xnview wrote: Ok, please try the 1.94 beta 2 when will be available...
I is really much faster than before. Ver 1.93.6 loaded 100000 photos in 2 minutes 40 seconds. Ver 1.94 b2 did the same in 32 seconds! That's a great progress.
And a little more of measurements. A slideshow *.SLD with 470000 photos loaded in 25 minutes. The slideshow started in 2 minutes 45 seconds after pushing "Go" button. In random mode no picture with index of more than 50000 was shown. Most of all were about 5000-20000. I looked for the first 50-100 photos in a slideshow.
It's my fault. I can't explain clearly because of my bad english.xnview wrote:Sorry but i don't understand.In short: do not use "Random()*Random()", just use "Random()".
Yes, it was obvious before you said it. I wonder why I didn't think about it before. Hmm, so you shuffle images before starting a slige-show? Then it seems that problem is in that shuffle. Let us return to my yesterday's tests. I started a slideshow of 100000 images in random mode. I wrote down index numbers of 30 images in a row. Later I repeated the test, so i have an indexes of 60 images that XnView has shown in 100000-image slideshow. here are the numbers (sorry for such big column, I don't know how to hide it):xnview wrote:All pictures will be shown once per random "session". I don't use random each time when showing a picture.
Code: Select all
12535
14155
30838
31711
31928
34085
22227
23029
35628
35800
36064
9613
22416
20613
24810
25417
1569
2727
28381
34795
2822
36829
435
8129
18542
18775
16881
3349
26124
12554
12486
6612
6712
21846
25672
7133
5040
12408
18305
19950
6517
20008
8081
24934
1721
5656
6106
8607
20568
22475
23209
22034
18128
25259
21909
25263
17395
21040
22290
9644
Re: Slideshow random jumps are limited to 32K.
Probably it happened because rand() was used in xnview. The rand function returns a pseudorandom integer in the range 0 to RAND_MAX. RAND_MAX is equal to 32767Fuhrer wrote:When slideshow starts, it jumps only within first 32000
MS: http://msdn.microsoft.com/en-us/library ... 71%29.aspx
POSIX: http://www.opengroup.org/onlinepubs/000 ... /rand.html
Re: Slideshow random jumps are limited to 32K.
Right, it's the problementryway wrote: Probably it happened because rand() was used in xnview. The rand function returns a pseudorandom integer in the range 0 to RAND_MAX. RAND_MAX is equal to 32767

Pierre.