O4WTableEnd (OpenInsight 64-bit)
At 28 SEP 2023 03:00:06PM BrianWick wrote:
When Building and O4W page O4WTableEnd takes the most CPU time by at least 100 times vs. any other O4W??? subroutine/function - even to the point if I remove just a "border" style it speeds up around 20%.
Changing / removing Styles like background has no effect.
In my case one of my pages calls O4WTableEnd around 425 times - at a CPU cost of 1.6 CPU seconds - where ALL the other O4W??? subroutine/functions like building a Listbox, texbox, plain text and O4WTableStart take a than a CPU second (combined) for the same 425 calls.
Once the page in built in O4W - it does not affect the load time at all.
Any ideas - maybe I am missing something obvious - as I optimize my pages ?
tx
Bri
At 28 SEP 2023 03:50PM bshumsky wrote:
Hi, Brian.
All the work in making a table is done in O4WTableEnd - O4WTableStart, and all the filling of the table "cells", essentially just "store away" the passed-in information until you call O4WTableEnd, and that's when it's turned into actual html and javascript calls to make the table.
Once you hit the O4WTableEnd, all the details and contents of the table start building out into the "response" html, so you've got a string that keeps getting bigger and bigger, and that's pretty time consuming in OI.
I hope that explains why the other calls seem like they don't "cost" anything, in comparison. As to what you might do to optimize this - I can't really suggest anything off the top of my head. It's "expensive" because it's doing a lot. So long as you want that all to be done, it will take time, I'm afraid.
- Bryan Shumsky
At 28 SEP 2023 04:32PM BrianWick wrote:
Tx Bryan -
Unfortunately - its makes perfect since.
I assume 500 controls in one table would be the same CPU time as 25 controls in eaqch of 20 tables.
bri
At 29 SEP 2023 01:47PM BrianWick wrote:
Hi Bryan -
I have duplicated everything in a snippet and confirmed the obvious.
The Number of tables and embedded table adds very little to additional CPU time.
In my case when I add styles (font, color, BG color, size, border,…) to the controls, the CPU time doubles when O4WTableEnd is called.
In my case of 425 controls on a page, removing all styles O4WTableEnd takes .85 CPU seconds.
And Putting the styles back on the controlsO4WTableEnd takes 2.0 CPU seconds.
And the more distinct styles that are used further causes a bit more CPU time.
tx
Bri