-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Renode 1.4 UART monitor on Windows 10 not updating in real time on multi-core machines #17
Comments
It's probably a side effect of moving to WPF, not anything we added as a feature. We will investigate it |
Probably yes, it could be some smartness to make it more efficient? Which looks like is, as the execution finished much faster, but at price no seeing anything and wondering if it got stuck somewhere. |
Just tested it with a Win10 VM from here: On a positive note, now the Renode 1.4 on Windows 10 works straight away, so no need to install that gtk sharp dependancy as previously. |
Yet another update/correction. It has nothing to do with the VM, it was only coincidence that by default the VM had a single core, after giving it more resource it became broken again. And now I can "fix it" on a native machine as well, after starting renode and giving it affinity of 1 core, the original (update all the time) behaviour is back. Is this maybe a race condition or synching between multiple threads? Even giving the VM 2 cores or the affinity of 2 threads should be enough to "break it". I would say slower, but consistent and predictable results would be better. On Linux even with 32 thread machine the UART behaves as expected. |
Nice findings, this will help a lot! Thanks. |
Fixed in 76934a4. This was due to Terminal spamming WPF with new character events. We changed the way XWT handles GUI events in WPF completely. It may still need some optimizations, and your mileage may vary on different PCs. |
I will re-test it after this fix will make into a release. |
If I understand the fix correctly instead of spawning each thread instance per character now the it's instancianed only once and then it's used to push all characters through the same instance. Looks much more efficient. |
Not exactly. |
I noticed the UART writes on Windows are much faster, probably due to buffering?
But now UART is not updating as much, with the mandelbrot example it only updates after everything is done. Because by default every single time the screen is cleared there is nothing else to see for many seconds (no history to scroll) only after it finishes it shows the last image.
Could it be some smart optimization? If something is written to a buffer within last 100ms then delay updating the display by another 100ms as it's probably under heavy updates, but because it's under constant updates it will actually never update.
If I artificially added delays on each frame update then it is updated every single frame, but if I decrease the delay slightly it's never updated again until the whole program finished.
I think it would be better if both implementations would be consistent, on Linux it updates straight away as any changes were made. Or have the buffer/smartness as an optional argument to turn on, but not have it set on by default when the other platform doesn't have it.
The text was updated successfully, but these errors were encountered: