Opening documents gets slower each time SOLVED
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.
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.
Opening documents gets slower each time
The time it takes to open a documents gets longer each time.
I created a WPF demo application so that you can easily see what I mean.
Just click on the "Open 20" button several times and whatch how the "ellapsed milliseconds" increase.
Is there something else that needs to be done to when closing an editor?
E.g. Is it required to call Dispose() at some point?
The Demo App can be downloaded here:
https://onedrive.live.com/?id=5E93A6A62 ... A622DFFE84
Best regards
Tino
PS: I just create a Winforms DemoApp with the same results.
I created a WPF demo application so that you can easily see what I mean.
Just click on the "Open 20" button several times and whatch how the "ellapsed milliseconds" increase.
Is there something else that needs to be done to when closing an editor?
E.g. Is it required to call Dispose() at some point?
The Demo App can be downloaded here:
https://onedrive.live.com/?id=5E93A6A62 ... A622DFFE84
Best regards
Tino
PS: I just create a Winforms DemoApp with the same results.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Opening documents gets slower each time
Hello Tino,
There are plenty of handles left after each execution of the "Open 20" command. And when you are opening the document, you are creating new control each time in the same process - I'm afraid you cannot manage the release of everything correctly by using C#. Probably you should rethink the logic so you would not create/destroy multiple controls each time.
Cheers,
Alex
There are plenty of handles left after each execution of the "Open 20" command. And when you are opening the document, you are creating new control each time in the same process - I'm afraid you cannot manage the release of everything correctly by using C#. Probably you should rethink the logic so you would not create/destroy multiple controls each time.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Opening documents gets slower each time
Hi Alex,
thanks for your answer.
But that's what we did with the old viewer and it worked fine. We simply called Dispose() on each Viewer to terminate it's according process.
And it is also the behaviour of our application for many years now, to open multiple PDFXControls, each in it's own tab page.
Since it has always been possible to open several controls at the same time (and still is), there should be a way to close each control entirely without leaving back open handeles or something else.
Please take a look at the video here to get an impression of what our app does with your editor:
https://onedrive.live.com/?id=5E93A6A62 ... A622DFFE84
Can you please offer a solution or a workarround for this.
Thanks in advance
Best regards
Tino
thanks for your answer.
But that's what we did with the old viewer and it worked fine. We simply called Dispose() on each Viewer to terminate it's according process.
And it is also the behaviour of our application for many years now, to open multiple PDFXControls, each in it's own tab page.
Since it has always been possible to open several controls at the same time (and still is), there should be a way to close each control entirely without leaving back open handeles or something else.
Please take a look at the video here to get an impression of what our app does with your editor:
https://onedrive.live.com/?id=5E93A6A62 ... A622DFFE84
Can you please offer a solution or a workarround for this.
Thanks in advance
Best regards
Tino
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Opening documents gets slower each time
Hello Tino,
One of our lead devs will look at this one when he has time.
Cheers,
Alex
One of our lead devs will look at this one when he has time.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Opening documents gets slower each time
Hi Alex,
OK thanks, than we have to wait.
I want to add, that we have use cases where our application runs 24/7, without getting restarted for days.
In this cases the performance loss gets significant after a few days.
Best regards
Tino
OK thanks, than we have to wait.
I want to add, that we have use cases where our application runs 24/7, without getting restarted for days.
In this cases the performance loss gets significant after a few days.
Best regards
Tino
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Opening documents gets slower each time
Hello Tino,
We will try to investigate this issue and hopefully find a suitable solution.
Cheers,
Alex
We will try to investigate this issue and hopefully find a suitable solution.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
- Tracker Supp-Stefan
- Site Admin
- Posts: 17824
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Opening documents gets slower each time
Hello Tino,
Just had a chat with Sasha - he was not able to reproduce the Crash, but was able to reproduce the other issue. Can you please let us know the exact build of the Editor you are currently using?
Regards,
Stefan
Just had a chat with Sasha - he was not able to reproduce the Crash, but was able to reproduce the other issue. Can you please let us know the exact build of the Editor you are currently using?
Regards,
Stefan
Re: Opening documents gets slower each time
Hi Stefan,
we are using the 6.0.320.1.
This version of the PDFXEditCore.x86.dll was also included in my Demo app posted above.
https://onedrive.live.com/?id=5E93A6A62 ... A622DFFE84
Best regards
Tino
we are using the 6.0.320.1.
This version of the PDFXEditCore.x86.dll was also included in my Demo app posted above.
https://onedrive.live.com/?id=5E93A6A62 ... A622DFFE84
Best regards
Tino
- Tracker Supp-Stefan
- Site Admin
- Posts: 17824
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Opening documents gets slower each time
Thanks Tino,
We are now waiting for a colleague from the head office (Western Canada, Pacific Time Zone) to look at this, and we will post again as soon as we have further info!
Regards,
Stefan
We are now waiting for a colleague from the head office (Western Canada, Pacific Time Zone) to look at this, and we will post again as soon as we have further info!
Regards,
Stefan
Re: Opening documents gets slower each time
Hi,
Best regards,
cew
Is there any information on these questions in the described use?mash_inc wrote:Is there something else that needs to be done to when closing an editor?
E.g. Is it required to call Dispose() at some point?
Best regards,
cew
- Tracker Supp-Stefan
- Site Admin
- Posts: 17824
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Opening documents gets slower each time
Hello Cew, Tino,
I am afraid that I've not received any feedback from the colleague that has to look at this. I will request an update once again now.
Regards,
Stefan
I am afraid that I've not received any feedback from the colleague that has to look at this. I will request an update once again now.
Regards,
Stefan
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2352
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Opening documents gets slower each time
Hi, Tino.
I investigated your sample from:
https://onedrive.live.com/?id=5E93A6A62 ... A622DFFE84
and made some important changes in it (here: http://www.docu-track.co.uk/WPFDemoApp.RegFree.zip):
1. added code that initializes/uninitializes our ActiveX SDK only once, please check:
MainWindow::MainWindow()
MainWindow::OnWindowClosed
- without it the SDK automatically initializes itself on creation of first pdf-control and uninitializes on disposing of last pdf-control - that will significantly slow down the normal user's work.
2. in MainWindow::CloseAllOpenDocuments() I changed the "userControl.CloseDocument()" to the "userControl.Dispose();"
The just "userControl.CloseDocument()" isn't enough because the user-control remains alive even corresponding tab is closed. I guess - because corresponding WindowsFormsHost-container(that is parent for the user-control) - remains alive too. It looks like that disposing of TabItem-object doesn't destroy the TabItem.Container object (that is WindowsFormsHost-container)..
As result - the fixed sample working well without annoying slowdown effect.
HTH.
I investigated your sample from:
https://onedrive.live.com/?id=5E93A6A62 ... A622DFFE84
and made some important changes in it (here: http://www.docu-track.co.uk/WPFDemoApp.RegFree.zip):
1. added code that initializes/uninitializes our ActiveX SDK only once, please check:
MainWindow::MainWindow()
MainWindow::OnWindowClosed
- without it the SDK automatically initializes itself on creation of first pdf-control and uninitializes on disposing of last pdf-control - that will significantly slow down the normal user's work.
2. in MainWindow::CloseAllOpenDocuments() I changed the "userControl.CloseDocument()" to the "userControl.Dispose();"
The just "userControl.CloseDocument()" isn't enough because the user-control remains alive even corresponding tab is closed. I guess - because corresponding WindowsFormsHost-container(that is parent for the user-control) - remains alive too. It looks like that disposing of TabItem-object doesn't destroy the TabItem.Container object (that is WindowsFormsHost-container)..
As result - the fixed sample working well without annoying slowdown effect.
HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Re: Opening documents gets slower each time SOLVED
Hi Vasyl,
thank you very much for your help.
The Dispose() on the Editor does the trick
I am a bit surprised about that, because we tried this a few days ago with no success, hmm
And as I mentioned, we did exactly that with the old viewer. But who cares, we are happy that it works now.
We also had the guess that something happens when opening the first and closing the last control.
Therefore, since a few days we start an invisible viewer and hold it open for the whole lifetime of the application. This also solved some performance and handling issues.
Thanks again.
Best regards
Tino
thank you very much for your help.
The Dispose() on the Editor does the trick
I am a bit surprised about that, because we tried this a few days ago with no success, hmm
And as I mentioned, we did exactly that with the old viewer. But who cares, we are happy that it works now.
We also had the guess that something happens when opening the first and closing the last control.
Therefore, since a few days we start an invisible viewer and hold it open for the whole lifetime of the application. This also solved some performance and handling issues.
Thanks again.
Best regards
Tino
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Opening documents gets slower each time
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ