GNU bug report logs -
#38754
[PATCH 0/2] Speed up the derivation linter.
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Thu, 26 Dec 2019 17:34:01 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> + (with-store store
>> + (parameterize
>> + ((%lint-checker-store-connection store))
>
> Actually it means that now ‘guix lint’ systematically connects to the
> daemon.
I guess that's the effect, were you meaning this would make a better
message in the commit?
> I wonder if we could arrange to open the connection lazily, and to
> somehow carry state across linter invocations. Perhaps
> ‘check-derivation’ should be monadic, with a field in <checker>
> indicating that. Sounds complicated though.
>
> Thoughts?
I did wonder if the code could somehow transparently be made more
efficient. Quite often database clients manage a pool of connections,
and when you perform a database operation, a connection from the pool is
checked out, and then returned once you're finished. But as you say,
this could be complicated. I think parameters can be set with
connections, and I'm not quiet sure what the interface should be.
I also did think about somehow passing the store connection in to the
lint checker more explicitly, but I'm not sure how to generalise that.
At least to me, a parameter to store the connection in seemed like a
simple if inelegant approach. I'm quite happy to look in to other
approaches though if you have thoughts on what might be good.
Thanks,
Chris
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 5 years and 53 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.