Posted 27 August 2019, 2:29 am EST
Hello,
we have been using ComponentOne in our .Net Environment for several years and are currently in the process of moving some of it into the web using Angular/Typescript and Wijmo.
While evaluating the usage of your grid components in our project we ran into some significant performance problems when using the template mechanism for angular to customize the style of our cells. We have built a demo project where the problem can be reproduced. The resizing of the window or the column-header width is really slow.
The profiler shows us that there are way too many render calls in wijmo when you start changing the size. About 100-1000 per second.
It looks like the performance gets worse as the app becomes more complex. In a very simple scenario, with just one grid and nothing besides, the performance is okay.
But in our real life project the performance is getting worse pretty fast.
In the demo-project we tried to simulate a more complex situation - making use of *ngIf directives with some simple expressions.
This does not seem to be a particular problem with the usage of ng-template. We think there is a general problem with the triggering of rendering calls.
Maybe as a hint for you: The performance takes a huge hit when we specify the [cellType] = “‘Cell’” on the ng-template.
Tests were made with Chrome Version 76.0.3809.100 (64-Bit) and Firefox Version 68.0.2 (64-Bit).
The resizing of the window in Firefox does trigger significantly fewer render calls than it does in Chrome.
Our current hotfix for the problem uses the flexGrid.invalidate(false) call. This call will partially reduce the amount of render calls. This creates some other smaller problems but these are not as annoying as the low performance on resizing. But this at least seems to indicate that it is in fact possible to somewhat control these large amount of unnecessary render calls within wijmo?
onResize(event: any) {
if (this.flexGrid) this.flexGrid.invalidate(false);
}