instant team mailing list archive
-
instant team
-
Mailing list archive
-
Message #00186
Re: md5 deprecated
On ma., 2008-09-01 at 14:09 +0200, Martin Sandve Alnæs wrote:
> 2008/9/1 Anders Logg <logg@xxxxxxxxx>:
> > On Mon, Sep 01, 2008 at 01:54:09PM +0200, Martin Sandve Alnæs wrote:
> >> 2008/9/1 Anders Logg <logg@xxxxxxxxx>:
> >> > On Mon, Sep 01, 2008 at 01:07:33PM +0200, Martin Sandve Alnæs wrote:
> >> >> Another suggestion for the TODO list (but not on the top!):
> >> >> - Implement in-memory cache for already imported modules (based on signature)
> >> >> I.e. a global dict on the form
> >> >> _module_cache = { "module signature": previously_compiled_module }
> >> >> which is looked up transparently.
> >> >
> >> > It should not need to be mapped specifically from a signature, but
> >> > should work for everything that is hashable (which means we can just
> >> > use a dictionary).
> >> >
> >> > FFC keeps a module cache based on the form object (since computing the
> >> > signature may sometimes take time).
> >> >
> >>
> >> Computing repr(form) + repr(options) shouldn't take much time?
> >
> > Yes, it does. At least it is noticeable for some forms.
> >
> >> Anyway, the signature in question here may be a signature passed
> >> by the user (e.g. FFC), i.e. it can be a hash string of anything you want.
> >
> > Does it have to be a string? I'm just saying Instant doesn't need to
> > know what it is, as long as it's hashable.
> >
> > --
> > Anders
>
> Ok.
>
So the cache should be:
module_cache [hash(whatever)] = whatever
where whatever might be a signature or something different ?
Kent
Follow ups
References