First document open results in a ~500-600ms UI freeze

Bars for WPF Forum

Posted 2 months ago by Alex
Version: 24.1.3
Platform: .NET 8
Environment: Windows 10 (64-bit)
Avatar

If the ribbon content is complicated enough, I notice considerable freezes each time I first open a document of a kind. Next open documents of same kind open instantly. Now, is there a way to somehow skip this freeze? I am okay with controls populating the ribbon one by one, as long as it's not too slow (which would be strange on my 2023 pc with zero load when testing this) -- but is there something I can do to fix the freezes?

Comments (4)

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Alex,

We aren't aware of anything like that.  Our Ribbon in the Bars demo has a fairly complex first few tabs and it opens almost instantly.  Could you provide more information on how you are building up your Ribbon (XAML, MVVM, or other) and mention if there is anything non-standard that you might be doing.

Can you reproduce it in our sample project, or in a new simple sample project of your own?

Also if you have a performance profiler app like dotTrace, you could try using that to narrow down where the slowdown might be.


Actipro Software Support

Posted 2 months ago by Alex
Avatar

Fully MVVM, with considerable amount of custom controls. Jetbrains' profiler said that it was all deep in MeasureOverride calls, with lots of logic around VariantSizing. I managed to decrease the freezes to minimum by enforcing VariantSize=Large, as AI recommended upon investigating the logic in your code. It said that once we do that, the routine becomes single-pass, and that speeds things up. We confirmed that it helped a lot, albeit not eliminated the problem entirely.

I've prepared the reproduction sample (can't really testify it to be minimal though), but I'd rather not publish it to the internet. Can I e-mail it to you? Or should I post a google drive link which you would use to request access to it?.. or just give me an email to which I'll grant the access? 

In the repro sample, lags are not very big -- but still clearly perceptible. Since my PC is far from low-end, I have the feeling it would feel way uglier on older machines.

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Yes there will be measure passes made on the controls, and more if more variants, since it needs to map out the widths at which variant changes should be made for each variant.  That being said, it has always run very fast with our built-in controls.

If your custom controls involve complex layout routines, then perhaps that is contributing to the overall time here.  We can have a look.  If you write our support@ address, it will create a support ticket.  Or you can go to the support ticket system directly and create a ticket there.  If you do the latter, you should be able to upload a .zip file into the ticket.  Mention this thread in the ticket you create.  Thanks!

The support ticket system is private (between you and Actipro), unlike these discussion forums that are public.


Actipro Software Support

Posted 2 months ago by Alex
Avatar

I've created a ticket as you suggested. Even though I've managed to cut the freeze time to rather short (sub-0.5s) delays, I would still love to provide users a completely smooth ui experience, so if you have good advices on how I could improve our ribbon builder, I'm all ears and would love to hear it. Thanks for answering!

The latest build of this product (v25.1.4) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.