Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Why does my MATLAB Builder JA code run slower when run on the EDT in MATLAB Builder JA 2.0.4 (R2009b)

1 Ansicht (letzte 30 Tage)
If I run MATLAB Builder JA code in the main body of my pplication or on a "normal" separate Thread; the code executes about as fast as in MATLAB. When I use a thread on the EDT however, I notice the methods take much longer to complete. What is causing this?

Antworten (1)

Murugavel Sivagnanam
Murugavel Sivagnanam am 12 Jan. 2011
To prevent GUIs from locking up when calling into a MATLAB Builder JA created class, the com.mathworks.toolbox.javabuilder pacakge manually allows other threads on the EDT to execute first. This will lead to your own thread on the EDT being interrupted which leads to a decrease in performance.
So apart from the fact that running CPU intensive operations (which your MATLAB routines usually are) on the EDT is not a good idea in general (as it will lead to sluggish GUI behavior). You also should not run the MATLAB Builder JA code on the EDT as it will decrease its performance

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by