switchserver and performance issue urgent!!

Hi, I notice a significant performance issue when using switchserver.

This only happens in Servoy server and not in Developer.

When I create a Servoy database server directly (using the same database user/schema) and use that in my application (without a switchserver) it is twice as fast.

The switchserver is done in the onOpen.

The database is Oracle10gr2 ( it also happens with 11gr2). The servoy version is 5.2.8 and the java version is 1.6.0_24

Is this a known issue ??

Regards,

Are you sure that both databases have the same structure and the same indexes? I use switchServer in very large projects based on Postgres and DB2/400 without any issue.

In my test I used the same database user/schema, once using switchserver and once without.

And also the performance issue only occurs when using servoy server, not in developer

Hans,

If you have some slow queries, these should show up on the performance data page of the admin page.
What happens if you run the slow queries directly using a db tool on different databases?

Rob

Already checkt this.

The queries do not seem to be slower, but the overall performance of the method
that reads in the programs ( for the Servoy framework (dataset/foundset handling) ) is much slower.

I already dropped a question for Sanneke.
Also I’ll investigate some more and get back.

Thanks

Hans,

When application server starts, a background job is started that loads all table names from all servers and then it loads all column details from each table.
This information is cached so it is done only once.
This is sometimes slow, we have seen that especially on Oracle connections.

Could it be that the Application Server is still loading tables from the first server?

After the first client has loaded, is the second one fast as expected?

Rob

Hi,

I did some more research and I concentrated on the difference in performance between delevoper and server. (same database and database user and servoy database server and same solution on same computer)
When I do not use a switchserver command there is no difference.
When I do use the switchserver command, the method that reads in the programs ( servoy framework : svy_nav_init_programs)
takes about 10 times longer to execute in server then it does in developer.
The queries are equally fast (checked in performance page of servoy admin page), so there’s no problem.

I did put some log commands in this method and as You can see in the attached files ( i only put in the first 3 loops )
developer does this in about 146 milliseconds and server takes 1039 milliseconds. That matches the user expirience ( 10 times slower ).
It has nothing to do with startup of servoy server, beecause if I logout/login in the application, the solution stays actiev, only the inits are executed again
( and one of them is the svy_nav_init_programs)

see the attached files

firstloopsServer.txt (1.3 KB)

firstloopsDeveloper.txt (1.3 KB)

method.txt (14.4 KB)

Hi,

I am stil having this problem when using switchserver and I can not find it’s cause.
The switchserver is used to have a different database schema for the framework.

When running smart client from developer there is no issue !!
Only when running smartclient from server ( with the same database, data, database user/schema, solution ) the method init_programs runs about 10 times slower.
This means that the login for the user takes 30 seconds instead of 3 !!!
The only difference is running from developer or running from server.

Can one of the Servoyans have a look at this ??

Regards,

Hans,

Can you try to create a thread dump from the admin page when the user is logging in on the appserver?
If the server is busy a lot in 1 method it may pop up.

Can you also try the same solution in Servoy 6.0 developer?
I would like to see if a change in Servoy 6 affects this.

Rob

Rob,

See the two dumps I made during the login.

I’ll try to test with version 6 tommorow

ADDITIONAL INFO :

tested with 6.0 and there the smartclient from developer is also slow. ( as is the smartclient from server )

Regards,

Hans

dump2.txt (18.8 KB)

dump1.txt (19.5 KB)