Servoy glacially slow - minutes to load a record

is this web or smart?
Do you also have this slow loading in a simple solution when using that same stylesheet?

mboegem:
What else is triggered during startup?
Do you touch a lot of forms?

Which version of Servoy are you using and - depending on that - did you use the profiler to find out how much time your code actually needs to run?

There’s not much code during startup, Marc.
It’s Servoy Version: 5.2.6 - build 1011
It loads quickly if I don’t use my styles.

jcompagner:
is this web or smart?
Do you also have this slow loading in a simple solution when using that same stylesheet?

It’s smart client, Johan.
If I separate my module and remove all stylesheets, it’s loading ok.
If I create a sample solution with just one form, attach my css to it and use it on a few elements, the speed is ok.
The problem comes up when there is a lot of forms in my solution and they use many elements that use that css.

Are any particular rules of using css pictures more efficiently? It’s mostly about background pictures I think.

Cheers,
Maria

i have currently no idea what is going on there
Because for a smart client the css is only used when the form is really created, so after creation it doesn’t do anything with it anymore.
Then it could be that you do create a few forms at one time at the same time when showing 1 main form with a number of visible forms in tabs?
Is that then slow?
Or is it the number of elements on 1 form?

jcompagner:
i have currently no idea what is going on there
Because for a smart client the css is only used when the form is really created, so after creation it doesn’t do anything with it anymore.
Then it could be that you do create a few forms at one time at the same time when showing 1 main form with a number of visible forms in tabs?
Is that then slow?
Or is it the number of elements on 1 form?

Well, we do have multiple forms in tabs in each module and, as I debug, all of them are getting loaded, even those not shown.
We don’t create forms in solutionModel, not sure what you mean by ‘creating forms’.
It’s only at load time that it’s slow. But as far as I’m aware the deployed application will unload and load back forms on its own, so even after the initial load it may still get slow.

Cheers,
Maria

are those tabs design time placed? Or are you doing that in code through addTab() ?

jcompagner:
are those tabs design time placed? Or are you doing that in code through addTab() ?

Johan, the tabs are there at design time.

do you then somehow touch those forms in an onload or show of a parent?
Forms are really not constructed when they are not really shown or touched in code.
If that happens with you do make a sample where you see the onload of forms touched that are not shown anywhere yet in a tab or main.

jcompagner:
do you then somehow touch those forms in an onload or show of a parent?
Forms are really not constructed when they are not really shown or touched in code.
If that happens with you do make a sample where you see the onload of forms touched that are not shown anywhere yet in a tab or main.

All right, Johan, I think I found the problem: on the main module form I have multiple tabpanels with one tab each (as opposed to one tabpanel with multiple tabs).
I hide all of them except one and that’s probably causing the forms in them to load ‘prematurely’ :)
Thanks a lot for suggestions, I hope I can fix it now.

Cheers,
Maria