How to improve compilation time and loading time of packages?

Some additional information: the utility package is actually not recompiled if it is not changed.

If the utility package is modified, calling @time using PostgresqlDAO gives:

[ Info: Recompiling stale cache file /home/myuser/.julia/compiled/v1.1/PostgresqlDAO/aXv1G.ji for PostgresqlDAO [9f278218-a07e-11e9-18c7-113e7cd19c36]
 15.867777 seconds (21.47 M allocations: 1.073 GiB, 2.41% gc time) 

If the utility package is NOT modified, calling @time using PostgresqlDAO gives:

7.756099 seconds (19.76 M allocations: 1015.470 MiB, 4.58% gc time)

Those 7.75 seconds are because the loading of the utility package implies the loading of its own dependencies. If I preload those dependencies (using Tables, DataFrames, JuliaDB, Query, LibPQ, Dates, UUIDs, TickTock) calling @time using PostgresqlDAO gives:

0.159535 seconds (205.38 k allocations: 10.726 MiB, 4.35% gc time)

No loading time anymore (I guess this is the case as long as the versions of the dependencies declared in the Manifest.toml of MyMainProject and PostgresqlDAO are the same).

So, all that to say that what actually takes time is not the compilation time but the loading time of the packages required by my utility package PostgresqlDAO. A quick search shows me that I am not the only one to find the loading of the packages very slow. I’ll dig into it to see if there’s useful anything I can find.