Dear Erik,
I thought I'd report back briefly on some results.
Thanks for trying. Can you share your code?
First, I spent some time attempting to implement "perform with session state". This is the idea that when working with ASDF, it would be useful to be able to invoke or create specific behavior for my use case and also to be able to capture work session state without relying on globals. This was partially successful, but I broke something and ran out of patience. ASDF is some wonderful code, but takes a bit to grok it all.
In the past, I've slightly modified ASDF to make it easier for POIU to do its job. If there's some interface I can expose so your hack can be an extension of ASDF rather than a wholesale replacement of its functionality, I'll be glad.
So I took the crude approach of just installing a global and using it to accumulate loaded files from within a perform. I created an .asd file which defined the dependencies I wanted the image to have. The loaded it with load-system. Then at the end of load-system I inserted code to save a structure containing a list of the *defined-systems* as well as a list of the loaded files (in order of loading).
NB: POIU also has a mode to record and replay a list of accumulated files.
Am I correct that these are the things you're trying to do? (1) load all the dependencies (2) record what are the things loaded so far (3) load your application (4) when you refresh your application, skip the recorded dependencies.
If so, then I propose you use the functionality I added to 2.20.21 for the measly cost of 12 lines of code, registered-systems and :force-not:
(asdf:load-systems '(dependency-a dependency-b)) ;(1) (defparameter *recorded-dependencies* (asdf:registered-systems)) ;(2) (asdf:load-system :my-application) ;(3) (asdf:load-system :my-application :force-not *recorded-dependencies*) ;(4)
If you want more fine-grained control, you could provide an override defmethod operation-done-p :around
If you like my :force-not feature, I'd appreciate you write a test case in the asdf test suite.
It was about 2.5 seconds to traverse normally, and about 0.5 with this optimization for a require after the first one (of course for a deployed system not development.)
Can you confirm it works well with my proposed solution?
In any case load time is not my only interest. It is also a desire to be able to use ASDF more effectively for more use cases.
Same here.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org It is a miracle that curiosity survives formal education. — Albert Einstein