How to add thumbnails rapidly

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
kyo
User
Posts: 130
Joined: Mon Oct 31, 2016 11:58 am

How to add thumbnails rapidly

Post by kyo »

Dear All,
I have run into a problem of adding thumnails to panel slowly.

Recently,I have done a performance test to add a large quantity of thumbnails (C# usercontrol) to my own thumbnails pane.
But,it takes about 8s to add all the thumbnails (about 160 pages) that is quite slower than your Editor SDK thumbnails pane can do.

What an amazing that your Editor SDK thumnail pane can load large quantity of images (control) in such short time.

I have implemented my own thumbnails pane with C# FlowLayoutPanel.
Can you give me some advice or ideas about how to make the adding more rapid?or how does your Editor SDK do that?

Thanks in advance.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to add thumbnails rapidly

Post by Sasha - Tracker Dev Team »

Hello kyo,

For starters, we cache the thumbnails so that we don't fully draw them each time. Also, we are loading them in the different thread allowing the program to work while they are loading. By implementing this behavior you should be able to speed up the thumbnails load.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
kyo
User
Posts: 130
Joined: Mon Oct 31, 2016 11:58 am

Re: How to add thumbnails rapidly

Post by kyo »

Hello,
By the way,I want to know your Editor SDK's Thumbnails pane is written by C++ or C#?

As far as I know,C# language only support the UI thread (main thread) to manipulate the UI related controls,and other sub threads need to be invoked to the main thread to do this.That is to say,in C# we could not use multiple threads to manipulate UI in a fully concurrently way(the threads would compete for the main thread) .

I guess that your Editor SDK's Thumbnails pane is probably written by C++.

Anyhow,caching the thumnails is important to improve the performance.

I will try the cache approach.

Thanks.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to add thumbnails rapidly

Post by Sasha - Tracker Dev Team »

Hello kyo,

The Editor itself and all of Tracker's products are written at C++ as the speed and efficiency optimization are crucial.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply