ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Preload Images

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
zerob Posted - Nov 29 2024 : 10:26:56
Hi Nigel

Is it possible to force a ImageEnMView (with PDF's or Movie Frames) or a ImageEnFolderMView with files to preload?

Right now the ImageEnMView stutters after a PDF load while scrolling, until all Pages got into view and then it scrolls smooth.
LookAhead soesn't seem to solve this.

A PreloadAll or PreloadXPages(x) and / or a a complete decoupling of loading and scrolling (with placeholders) would be nice.

Having a stutterfest while scrolling a ImageEnMView with 15 pages (or sometimes much more), until all pages have been scrolled into view, isn't really nice.
9   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 05 2024 : 19:19:18
OK, we'll consider that for a future version.



Nigel
Xequte Software
www.imageen.com
zerob Posted - Dec 05 2024 : 06:31:37
Thank you very much.
Maybe later a param to limit the preloading to a certain number of pages would be nice.
For example if you want to load the Thumbnails fast and some day a user loads a 2000 page document (or 300 or some other big number).
Then it would be nice to preload maximal X pages and do the rest on demand.
I don't know if the loading is multithreaded and uses up a very low RAM amount, or if it is blocking the whole UI while it loads x Gigabytes as Thumbnails.
xequte Posted - Dec 04 2024 : 21:37:12
Thanks for the demo.

I've made a logic change in the current beta.

With PDF TImageEnMView.StoreType will now operate in two different ways:
- ietFastThumb: PDF pages are loaded as they are displayed in the TImageEnMView
- ietThumb: All PDF pages are loaded at the outset into the TImageEnMView

e.g.

// Show thumbnail preview of all pages of a PDF document (loading pages as they are displayed)
ImageEnView1.PdfViewer.Enabled := True;
ImageEnMView1.StoreType := ietFastThumb;
ImageEnMView1.AttachedImageEnView := ImageEnView1;
ImageEnMView1.MouseWheelParams.Action := iemwNavigate;      // Allow navigation by spinning the mouse wheel
ImageEnView1.IO.LoadFromFilePDF( 'C:\document.pdf' );

// Show thumbnail preview of all pages of a PDF document (loading all pages immediately)
ImageEnView1.PdfViewer.Enabled := True;
ImageEnMView1.StoreType := ietThumb;
ImageEnMView1.AttachedImageEnView := ImageEnView1;
ImageEnMView1.MouseWheelParams.Action := iemwNavigate;      // Allow navigation by spinning the mouse wheel
ImageEnView1.IO.LoadFromFilePDF( 'C:\document.pdf' );



Nigel
Xequte Software
www.imageen.com
zerob Posted - Dec 04 2024 : 02:52:36
I get it in my app, no matter if i set it to ietThumb or ietFastThumb.
The only change i get with FastThumb is, that the Thumbs look really awful, as many things like lines and text looks too bold and too thick heavy black color.
Your PDFViewer demo still has the scroll lag.
The PDF im using is a random 37 page PDF i've downloaded from a customer.
I send you my demo together with the pdf in a demo, you can see both reported things (the stutter in the ImageEnMView on fast scroll, and the image placement at the cursor there.)
xequte Posted - Dec 03 2024 : 17:33:56
Hmmm, I'm not seeing that with ImageEnMView1.StoreType := ietFastThumb;

Is it a particularly complex document??

Can you try using our PDF Viewer demo (adding ImageEnMView1.StoreType := ietFastThumb):

\Demos\PDF\PDFViewer\PdfViewer.dpr


Nigel
Xequte Software
www.imageen.com
zerob Posted - Dec 03 2024 : 16:49:59
I didn't notice any change in the beta. Do i need to do something to trigger the new changes?
xequte Posted - Dec 01 2024 : 19:43:40
Sorry, can you email me for the latest beta. In that configuration changing the StoreType will not improve the performance.



Nigel
Xequte Software
www.imageen.com
zerob Posted - Dec 01 2024 : 01:45:24
I connected a ImageEnMViewer to a ImageEnViewer and did load a PDF with either ImageEnView1.IO.LoadFromFilePDF or ImageEnView1.PdfViewer.LoadFromFile.

I tried without changing caching settings and then with:
ImageEnView1.PdfViewer.LoadOption := TPdfDocumentLoadOption.dloMemory;
ImageEnMView1.LookAhead := 50;
ImageEnMView1.EnableImageCaching := True;
ImageEnMView1.ImageCacheUseDisk := False;

And i set ietFastThumb, but changing it to ieThumb doesn't change anything. Even when i Load the PDF, wait 10-20 seconds and then scroll

When the PDF is loaded, i scroll the ImageEnMView and the scrollbar stutters until i scrolled down to the bottom and waited or if i don't stop scrolling, it stutters also on the way up (if i scroll up and down) and suddenly the stutter stopps and now all scrolling is smooth as butter.

It seems that ImageEnMView still loads the PDF pages only when they scroll into view and when it saw all pages, it runs smoothly.

I Imagined, when i wait for a few seconds, with LookAhead (or some magical preload function), then when i want to scroll, the ImageEnMView scrolls smoothly, without the need to scroll each Page into view (Inside of the ImageEnMView).
xequte Posted - Dec 01 2024 : 00:36:52
Are you loading as follows: ImageEnMView1.MIO.LoadFromFile(...)?

What is your StoreType? To prevent loading on demand, you can use ietThumb.

http://www.imageen.com/help/TImageEnMView.StoreType.html

Nigel
Xequte Software
www.imageen.com