AIS_InteractiveContext::UpdateCurrentViewer() build up call queue and slows down to a halt

Hi there,

While working with the CSharp_D3D example, i have noticed that in some operations, like rotate or pan (specially with a complex part in fullscreen), the amount of AIS_InteractiveContext::UpdateCurrentViewer() calls become way too many for the Redraw method to respond to the point that it seems to hang until you stop moving the mouse.

Is there a built in mechanism to provide consistent/adaptative framerate that still leaves room for other operations and events to be attended? Or maybe this issue could be caused by some other reason?

As a side note: In a graphic engine i built some time ago, the requests for redraw were not always attended immediately, but just flagged the redraw, then when the engine saw fit, it will redraw if it was flagged (according to its current frame rate and leaving some few extra ms for other systems to continue working), this way, even if moving the mouse like crazy, the paint was not saturating the system nor the paint requests were queuing up.

Thank you in advance!

Dario Dura Armadans's picture

Found the solution to it, thanks!

Where can i send the fix for the sample?

Dmitrii Pasukhin's picture

Hello. Please share your sample improvements as a PR in GitHub: Open-Cascade-SAS/OCCT: Open CASCADE Technology (OCCT)

Please check details the OCCT, GitHub - New way to collaborate [Issues, PRs, Discussions]

Best regards, Dmitrii.

Dario Dura Armadans's picture

Will do, thanks!

Best regards,
Dario

Dario Dura Armadans's picture

Hi Dimitrii,

Actually i've improved it a lot now (quite consistent frame rate). But the change is quite major (dummy animation to force paint, mouse handled without mouse events but done in paint event using win32 mousepos...).

Maybe i can explain to you the change or send you my code so you can do the commit?

Coz i got the source and all, and started the change but when i build thousands of files come to github to checkout, so i dnt want to mess it up.

Thanks,

Dmitrii Pasukhin's picture

You can create PR based on some older version (Important Announcement: OCCT 8.0 Release and Patch Migration Process) 7.8.0. 7.9.0. If some target branch is missed - you can inform and I can create new IR to some middle branch.

Integration of your changes will require signed CLA in any cases. We can process the migration, testing and adaptation of your changes. The delivery can be as a commit in GH, commit in Mantis or patch file, delivered by email or some drive storages.

Best regards, Dmitrii.