How to improve compile times?

We have an eSpace that is really large, and it takes a long, long time to publish (5 - 8 minutes). Version on Windows.

Other than changing/refactoring the eSpace itself, what is the best way to make this run faster?

I looked at the app server during a publish, and CPU stayed around 2% - 5% use, disk I/O was not very high, RAM usage stayed at 85% (it's a 4 GB system), network was under 1 Mbps. Unless the memory use is being limited and it really wants more RAM, it does NOT look like adding more resources will fix the issue.

In fact... it looks almost like the compilation is sitting around doing very little on the app server.

But then I looked at the DB server.

It was hitting the network to the tune of 10 Mbps during compilation (where was the data going? Not to the app server...), CPU was at 25% - 50% total on a quad core system, and disk was thrashing hard.

Should I just upgrade the DB server?


Hi Justin,

Did you see what queries it was doing?
What tables was it mosltly accessing?

João Rosado
Joao -

No, didn't check. I'll check later tonight.

You might also want to check for Slow SQL logs during the compilation process. 

Deleting old versions of espaces has helped me once on a project that had 5 years long of versions history and loads of dependencies. The database was not properly handling one of those queries until the amount of data went down. It's a pretty generic "solution attempt".. but worth a try
Goncalo -

Slow SQL suring compile that I see quite often:


OS: OutSystems.HubEdition.Compiler.Database.DBCompiler.InvalidOutdatedViews

OS: OutSystems.HubEdition.Compiler.Database.DBCompiler.GetDbSchemaFieldDataSqlServer_PKData

I will try deleting old versions. Our other eSpaces compile fast, even though they also have hundreds of old versions.

Hi Justin,

Think the only data intensive work that I can think that could generate that kind of load would be for the Processes Impact Analysis.
Do you have a big amount of active processes from that eSpace?

Also for the queries you mentioned I know that the uses of the "InvalidOutdatedViews" query is going to be reviewed soon by our Maintenance team due to performance problems in Oracle with high number of tenants. What is your average time/frequency on that one?

João Rosado
Guys, I've been experiencing problems on publishing time (using OSP) to Production environment due to a (not so) huge number of process's activity's records in OSSYS_BPM_ACTIVITY. I have a Java/Oracle Stack. I am now using BPTArchiver to help purging closed instance's records.
But what really helped me was making Oracle optimize an Insert command that is ran inside deploy process. The Oracle optimizer proposed an 80% better execution plan. I don't know why it didn't do this automatically, but it helped a lot. Deploy time now is taking 10 minutes max.
The answer, for us, has been a faster storage system on the DB server. Much of the slowdown was in "invalidating caches" which is very I/O intensive.