RevitLookup icon indicating copy to clipboard operation
RevitLookup copied to clipboard

View methods overloading low performance

Open Nice3point opened this issue 1 year ago • 3 comments

Execution of some methods takes quite a long time, about 4 seconds which is critical

Method Screen
CanCategoryBeHidden (ElementId) изображение
IsCategoryOverridable (ElementId) изображение

The reason for this is the presence of DWG links inside the families:

изображение

Should these methods be disabled or are they informative and should be kept? In models without DWG they are executed 16 ms

Nice3point avatar May 16 '24 13:05 Nice3point

Maybe this methods that require category as input should be generated only if the user click in the method, if the project have a lot of categories RevitLookup is checking for each one even if the user does not need that information.

I wonder how many categories do you have in this 4 second sample.

ricaun avatar May 17 '24 17:05 ricaun

I found a similar issue that is forcing everything to be resolved when the RevitLookup is opened.

Would be make sense to have some other kind of resolver that is only resolve when the user click, like Invoker.

public interface IDescriptorInvoker : IDescriptorCollector
{
    Func<IVariants> Invoke(Document context, string target, ParameterInfo[] parameters);
}

That would be handy Resolve/Invoke some custom methods only when the user need/want.

ricaun avatar Sep 06 '24 19:09 ricaun

@ricaun it is planned to add such a feature, though there is no certainty about the implementation and architecture design yet

Nice3point avatar Sep 08 '24 14:09 Nice3point