I want to be able to create several hundred instances of a winrt control (search result control) in a C # project. The problem is that it takes too much time (tenths of a second or worse) and must be executed in the user interface thread, creating kiosks and delays in showing the results.
I currently circumvented the issue by pre-caching many instances of the control at startup. This approach works, but affects startup time (profiling shows that 40% of the processor time near startup is done by caching these controls) and creates control details such as cache size.
I think the problem is that every time a control is created, redundant work, such as re-parsing XAML, is done by the underlying structure. Maybe there is a way to avoid repeating this work? Maybe I can cheaply clone existing control? Does anyone have any ideas?
source share