moosetechnology / MooseIDE

New Tools for Moose
MIT License
8 stars 18 forks source link

Speed up a few browsers #983

Closed jecisc closed 6 months ago

jecisc commented 6 months ago

Some browsers and calling #mooseInterestingEntity in their #miSelectedItem method. This will either return a moose entity if a collection has 1 element or return a moose specialized group.

I think this is not a good idea because this means we will generate moose groups each time we ask for the selected entity, which can happen often. For exemple to know if we should display the propagate or the inspect button in each browsers, at each refresh.

In an image with small models this can be ignored, but when you start to have big models it becomes really long to always create moose groups of thousands of elements.

I propose to remove the call to this method and instead to use it only in one place: The MiInspect command. This is, I think, the only place where it is interesting to have a specialized group (and I'm not even sure).

I have an image of 1.7Gb and opening the query browser went from 3sec to 300ms with this change. And this is the same for each action causing a refresh of the browser.