Replies: 9 comments
-
|
Sounds like a ton of work. This though, is very curious:
I wasn't aware of that. If true I would guess some interactive gui thing so the 3d plot maybe? Is it constantly redrawing even when you aren't rotating/zooming/panning? |
Beta Was this translation helpful? Give feedback.
-
|
I have noticed it for some time. My CPU gets warm and the fans turn on whenever DFTFringe is just sitting there. Manager says it uses 5% of the CPU always. I doubt it is the 3D. But I have no idea. I recall someone else saying the same thing about CPU usage. |
Beta Was this translation helpful? Give feedback.
-
|
I can't duplicate the cpu usage thing. If I move the mouse around over the application I can sometimes get it to use a little cpu but as soon as I stop it stops. I loaded an igram and processed it. If I zoom/orbit the 3d view I get some cpu usage but most of the time I get 0% cpu usage attributed to DFTF process. Mayube I need to run a particular process first? Such as the automation tool that loads multiple igrams? Or test stand astig removal tool? I tested with v8.2.0. |
Beta Was this translation helpful? Give feedback.
-
|
DFTFringe causes a constant 3.4% CPU usage in Task Manager. I have not run anything special. Perhaps it is just my version. I will check once I get to a point where I can close mine.
|
Beta Was this translation helpful? Give feedback.
-
|
I tried the current version and it does not cause constant CPU usage. However every one of my versions back to about 7.2 do. Maybe it is a Qt5-Qt6 thing. My current version was branched from current master so just the master part is not the fix. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @githubdoe, I'm thinking maybe this is the right time to start develop on Qt6 ? Some of the benefits I see:
I'm willing to help and do a video of the process to install the dependencies for Qt6 to make it easier for you. However, I'm not doing it now if you are not ready to give it a try soon because I want it to be as up to date as possible. Do you want to try building Qt6 ? |
Beta Was this translation helpful? Give feedback.
-
|
Thank you Jullian. Sometime early next year. Too many things going on now and the drive I use for that is nearly full. |
Beta Was this translation helpful? Give feedback.
-
|
FYI - I got QT6 working side by side easily. I have one version of qt creator and it will build for QT5 or QT6. I know you like to but there's really no reason to build openCV or any other libraries. You just need .h files and .dll files. I can zip up my build environment - basically a bunch of .h files and .dll files for you if you want. The zip files will create some folders next to your folder that you keep the DFTF source code. The only other thing you have to do is pretty damn simple - check some boxes and QT will install QT6 for you automatically. I can do a 1 minute video to demo that. And that video could show how you select QT5 build versus QT6 build. Once nice thing is that the QT6 .pro file works as is. It searches in relative paths and if I give you the zip file the .h files for opencv, armadillo, etc will be in the right spots. The dll files have to be copied manually once, but then it's fine after that. In QT Creator I can now switch between QT5 and QT6 easily. So let me know when you are ready to try QT6 and I'll zip up the files and make a video. |
Beta Was this translation helpful? Give feedback.
-
|
I still can't duplicate. I was building with QT5 yesterday so tried that version and I also tried v7.4 just now which was the most recent with QT5 and I can't get either of those to use cpu time when idle. Does it do it when you first launch but haven't loaded anything yet? What's the minimum I have to do to get it to happen? I tried processing a single igram. I also tried going to the foucault tab. For 1 brief second I saw the cpu go up to 0.6%. I got pretty excited. That was v7.4.0. But then nothing for the next 60 seconds. I think it happened when windows drew task manager on top of DFTF and it probably made DFTF redraw the windows that were partly covered by task manager. Maybe. But then 0% for the next minute. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Here are a couple of thoughts about where the code might be improved.
For some reason DFTFringe takes up lots of CPU cycles even when it is not doing anything. Some where it must have a busy loop that is just constantly checking something.
As George has discovered and fixed there are many places where it loops and then calls process events to keep the GUI alive. If I had to do it over again I would use a worker thread for that case. However both have the same problem in that I don't protect access to important data such as the list of wavefronts with mutex's. That means that one process might change that list while another was in the middle of using it. I'm sure there are other places like that still.
The second problem with worker thread is that some of the long processes like load wave fronts also create Q_Objects or Widgets. Those objects need a parent and it can not be the worker thread it should be the main thread. It will crash trying to create that object.
I ran into that condition when trying to thread loading wave fronts using a worker thread. Sigh.
So anyway with a lot of analysis one might be able to clean up those cases. Something to hope for.
Anyway I asked Gemini how to make worker threads in Qt for those cases and I like the code it created. I would use that pattern now if I could. It creates the worker and connects to signal from that thread using lambdas to monitor the process for completion and to show progress indicators if desired.
Just some thoughts.
Beta Was this translation helpful? Give feedback.
All reactions