[Cubicweb] Wild idea to speed up repository loading

Christophe de Vienne christophe at unlish.com
Mon Jul 7 22:57:24 CEST 2014

Le 07/07/2014 22:21, Sylvain Thénault a écrit :
> On 07 juillet 22:11, Christophe de Vienne wrote:
>> Hi all,
> Hi Christophe,
>> One of the reason the partial application reloading that is currently
>> implemented in cubicweb is that loading a complex schema from a database
>> can take quite some time.
>> If someday we switch to a complete reload (read: if we rely on pyramid
>> to do so), the time to reload would be a regression.
>> I wonder if we could save the pickled schema, along with a timestamp
>> corresponding the latest modification of the scheme.
>> If so, before reading the whole schema from the database, we would only
>> have to unpickle the schema from a local file : that would be faster
>> wouldn't it ?
>> I will not experiment with this idea right now but if someone want to
>> play with it I would love to hear about the results !
> that's something I had in mind for a while but never took the time to play with
> it. It would definitly be a huge speed-up, the biggest issue being when to
> invalidate this cache.

I expect the latest modification of the schema to be enough and it
should be easy to retrieve (some max(modification_date) on the few
entities storing the schema).


More information about the Cubicweb mailing list