SNAPSHOT_v13.1d_2023-11-01/Enterprise Deployment
Chrome on MacOS
Hello, when loading my largest (as number of screens) application, the browser takes a bit too much time in parsing the JavaScript code.
Before I start adopting a different loading strategy from the current one (where I have a single assembly), I was trying to understand where most of the time is spent.
I should note that I'm not an expert in this field.
However, it seems that screens composed of SplitPanes are among those that take the most time. In particular, it appears that the initWidget of my SplitPane takes an average of 60ms.
By running a test with the following code in the showcase:
I notice a significant variance in execution times. Is this normal?
The same code in my application is significantly slower, although not as slow as the actual code being parsed during loading.
DynamicForms also seem to take a considerable amount of time to load.
With the following code:
I've observed the same significant variance as I see for SplitPane, and I don't see a correlation with the number of fields.
This code also performs more slowly in my application compared to the showcase.
I don't know if this could mean that there's some problem in my code.
While I'm still trying to clarify my thoughts, do you have any advice?
Am I perhaps wasting my time, and would it be better to split the JavaScript loading so that it's loaded only when needed?
Edit: I just noticed that if I run those snippets in one of my smallest applications, they are even faster than in the showcase. Is it possible that the larger number of screens have this effect on performance?
Chrome on MacOS
Hello, when loading my largest (as number of screens) application, the browser takes a bit too much time in parsing the JavaScript code.
Before I start adopting a different loading strategy from the current one (where I have a single assembly), I was trying to understand where most of the time is spent.
I should note that I'm not an expert in this field.
However, it seems that screens composed of SplitPanes are among those that take the most time. In particular, it appears that the initWidget of my SplitPane takes an average of 60ms.
By running a test with the following code in the showcase:
Code:
isc.defineClass("MySplitPane", "SplitPane").addProperties({ autoDraw: false, initWidget: function () { var startTime = window.performance.now(); this.Super("initWidget", arguments); var duration = window.performance.now() - startTime; totalDuration += duration; isc.logEcho("SplitPane initWidget execution time: " + duration + " - total: " + totalDuration) } }) var numIter = 30; var timeout = 100; for (var index = 1; index <= numIter; index++) { isc.Timer.setTimeout("isc.MySplitPane.create()", timeout * index * 3) }
The same code in my application is significantly slower, although not as slow as the actual code being parsed during loading.
DynamicForms also seem to take a considerable amount of time to load.
With the following code:
Code:
var totalDuration = 0; isc.defineClass("MyDynamicForm", "DynamicForm").addProperties({ autoDraw: false, numItems: 1, initWidget: function () { var items = []; for (var index = this.numItems - 1; index >= 0; index--) { items.add({name: "field" + index, type: "float"}) } var startTime = window.performance.now(); this.Super("initWidget", arguments); this.setItems(items); var duration = window.performance.now() - startTime; totalDuration += duration; isc.logEcho(this.numItems + " items - DynamicForm initWidget execution time: " + duration + " - total: " + totalDuration) } }) var numIter = 30; var timeout = 100; for (var index = 1; index <= numIter; index++) { isc.Timer.setTimeout("isc.MyDynamicForm.create({numItems: " + index + "})", timeout * index * 3) }
This code also performs more slowly in my application compared to the showcase.
I don't know if this could mean that there's some problem in my code.
While I'm still trying to clarify my thoughts, do you have any advice?
Am I perhaps wasting my time, and would it be better to split the JavaScript loading so that it's loaded only when needed?
Edit: I just noticed that if I run those snippets in one of my smallest applications, they are even faster than in the showcase. Is it possible that the larger number of screens have this effect on performance?
Comment