Multithreading perfomance problems

Y

Yevgeny Barkovsky

Hello everybody!

Right now I have another problem with Visio 2003 :).
Application uses Visio Drawing Control. I must peform prolonged operation
over current page's shapes. So, I want to display progress dialog to user
with (for ex.) one button "Cancel" and ProgressBar.
To allow user to press Cancel button, I call Application.DoEvents for each
iteration of the process. It decreases perfomance, and I can understand why.
So, I try another way:
I create another thread, and move my prolonged operation to it. But
perfomance decreases dramaticaly- using profiler I see what cost of access
to Visio objects from another thread is rising by the high-order.
I think reason - is what synchronization between threads by Visio is
expensive. But I don't need to work with project's Visio instance outside my
prolonged operation.

Is it possible to fix this problem? Or, maybe somebody knows workaround
about it? May be it possible to "say visio what only this thread will use
this instance, so no synchronization required"? ^)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top