Re: [EQL5] Slow startup
On Thursday, January 14, 2021 2:09 PM, Erik Winkels > Anyway, for now the startup time is good enough. FWIW, loading :asdf alone is faster than I previously thought. With the compiler already loaded (require :cmp), I get (on Sailfish with 32bit ECL): > (time (require :asdf)) ;;; Loading #P"/usr/lib/ecl-20.4.24/asdf.fas" real time : 0.968 secs run time : 0.950 secs gc count : 10 times consed: 18966096 bytes ("ASDF" "asdf" "UIOP" "uiop") > Which seems good enough. Paul
Re: [EQL5] Slow startup
Hi, A bit of a late reply since the discussion has already continued but: On 2021-01-12 18:50, pls.153 wrote: So, my question is: if you don't add ASDF as a dependency, what error messages do you get at app startup? When I do not `(require :sb-bsd-sockets)` I get: Condition of type: SIMPLE-ERROR Package ((SB-BSD-SOCKETS . #)) referenced in compiled file NIL but has not been created and when I leave out `(require :asdf)` I get: Condition of type: SIMPLE-ERROR The packages ((UIOP/OS . #) (UIOP/PATHNAME . #package>)) were referenced in compiled file NIL but have not been created I tried your trick of doing a `defpackage` instead and while it worked it did not have a noticeable impact on startup time. Anyway, for now the startup time is good enough. Thanks, Erik
Re: [EQL5] Slow startup
On Wednesday, January 13, 2021 11:39 AM, Daniel Kochmański wrote: > Make sure you have uiop (a library) in your local projects or another > registry - otherwise asdf won't add it to the bundle because it is > 'preloaded' - and ql won't download it - ditto. thanks, I never needed uiop, but that works: I copied uiop from the asdf source tree to ~/quicklisp/local-projects/, and now it gets included. Paul
Re: [EQL5] Slow startup
Make sure you have uiop (a library) in your local projects or another registry - otherwise asdf won't add it to the bundle because it is 'preloaded' - and ql won't download it - ditto. Daniel Wysłano z aplikacji ProtonMail Oryginalna wiadomość 13 sty 2021, 08:39, pls.153 napisał(a): > ‐‐‐ Original Message ‐‐‐ > On Tuesday, January 12, 2021 1:30 PM, Erik Winkels wrote: >> I've alleviated my slow startup somewhat by >> >> diff --git a/make.lisp b/make.lisp >> index 41d4e3d..52b05b6 100644 >> --- a/make.lisp >> +++ b/make.lisp >> @@ -13,7 +13,8 @@ >> (asdf:make-build "app" >> :monolithic t >> :type :static-library >> - :prologue-code '(require :ecl-quicklisp) >> + :prologue-code '(progn (require :sb-bsd-sockets) >> + (require :asdf)) >> :move-here "./" >> :init-name "init_lib_APP__ALL_SYSTEMS") > > ok, so I just tried to build a dummy app on the desktop (problem is the same > there) with the dependencies listed in your ASDF definitions. > I added :uiop as an additional dependency (both in *.asd and > 'dependencies.lisp'), but this still didn't work without adding :asdf. > > But after the following hack (in 'make.lisp') I was able to run the app > without startup errors: > > :prologue-code '(progn > (require :sb-bsd-sockets) > (defpackage uiop/os) > (defpackage uiop/pathname) > (defpackage uiop/filesystem) > (defpackage asdf/operate) > (defpackage asdf/lisp-action) > ;;(require :asdf) > ) > > As you can see, creating some dummy packages and excluding ASDF worked (of > course you need to test if your app still works this way). > > Paul
Re: [EQL5] Slow startup
‐‐‐ Original Message ‐‐‐ On Tuesday, January 12, 2021 1:30 PM, Erik Winkels wrote: > I've alleviated my slow startup somewhat by > > diff --git a/make.lisp b/make.lisp > index 41d4e3d..52b05b6 100644 > --- a/make.lisp > +++ b/make.lisp > @@ -13,7 +13,8 @@ > (asdf:make-build "app" > :monolithic t > :type :static-library > - :prologue-code '(require :ecl-quicklisp) > + :prologue-code '(progn (require :sb-bsd-sockets) > + (require :asdf)) > :move-here "./" > :init-name "init_lib_APP__ALL_SYSTEMS") ok, so I just tried to build a dummy app on the desktop (problem is the same there) with the dependencies listed in your ASDF definitions. I added :uiop as an additional dependency (both in *.asd and 'dependencies.lisp'), but this still didn't work without adding :asdf. But after the following hack (in 'make.lisp') I was able to run the app without startup errors: :prologue-code '(progn (require :sb-bsd-sockets) (defpackage uiop/os) (defpackage uiop/pathname) (defpackage uiop/filesystem) (defpackage asdf/operate) (defpackage asdf/lisp-action) ;;(require :asdf) ) As you can see, creating some dummy packages and excluding ASDF worked (of course you need to test if your app still works this way). Paul
Re: [EQL5] Slow startup
On Tuesday, January 12, 2021 1:30 PM, Erik Winkels wrote: > I found this post (of yours?): > https://www.reddit.com/r/Common_Lisp/comments/hicmyt/error_with_uiop_running_ecl_application_built_by/g35fcib/ > > Is this what you meant? Where do you use this code? Yes, that was me. As (hopefully) everybody knows, ASDF is only intended to be used for loading/building CL libs or apps, and if some library depends on it at runtime, that's simply wrong by design; ASDF was never meant to be used like that. In my case, some library pretended ASDF to be present, without ever really using it, but it gave runtime package errors. So I just added the above, and it worked without problems (in my specific case). So, my question is: if you don't add ASDF as a dependency, what error messages do you get at app startup? Another way to deal with a _real_ ASDF runtime dependency (e.g. you want Swank to be running for eventual problems) and also keeping the startup time short, would be to start up the app first, and loading ASDF (together with any lib depending on it) in a thread, while keeping the UI responsive. I've done this successfully on mobile. Paul P.S. I will probably try to build your app and see for myself (having the possibility now)
Re: [EQL5] Slow startup
Hi, On 2021-01-01 12:12, PR wrote: Loading ASDF on mobile _is_ slow, and there is nothing we can do about it, unfortunately. I've alleviated my slow startup somewhat by diff --git a/make.lisp b/make.lisp index 41d4e3d..52b05b6 100644 --- a/make.lisp +++ b/make.lisp @@ -13,7 +13,8 @@ (asdf:make-build "app" :monolithic t :type :static-library - :prologue-code '(require :ecl-quicklisp) + :prologue-code '(progn (require :sb-bsd-sockets) +(require :asdf)) :move-here "./" :init-name "init_lib_APP__ALL_SYSTEMS") At least now I only have the slow startup time of ASDF which is currently acceptable for my app. At least it doesn't install Quicklisp on the first run anymore ;-) ASDF should therefore never be a dependency in a final app (there are ways to avoid it, even if some libraries want it to be present.) I found this post (of yours?): https://www.reddit.com/r/Common_Lisp/comments/hicmyt/error_with_uiop_running_ecl_application_built_by/g35fcib/ Is this what you meant? Where do you use this code? Bye, Erik
Re: [EQL5] Slow startup
On 2021-01-01 13:56, PR wrote: I will try to add some example myself, so in future this (almost empty) repo will hopefully get populated: https://gitlab.com/eql/eql5-sailfish I was a little busy this week so only noticed this mail now. That looks good, glad someone more experienced with Qt and EQL is on board!
Re: [EQL5] Slow startup
On 1/1/21, Erik Winkels wrote: > Ah yes, welcome to Sailfish! Thanks, yeah it's a great OS, it's hard not to love it, once you've played around with it! I will try to add some example myself, so in future this (almost empty) repo will hopefully get populated: https://gitlab.com/eql/eql5-sailfish Paul
Re: [EQL5] Slow startup
Hi, On Friday, January 1, 2021, PR wrote: > > Loading ASDF on mobile _is_ slow, and there is nothing we can do about it, > unfortunately. > > ASDF should therefore never be a dependency in a final app (there are ways to > avoid it, even if some libraries want it to be present.) Thanks, I'll move that to my longer term to-do list then. > With Sailfish there is the problem that prebuilt ECL and EQL5 are still 32bit, Ah yes, welcome to Sailfish! Erik
Re: [EQL5] Slow startup
On 12/28/20, Erik Winkels wrote: > ;;; Loading #P"/usr/lib/ecl-20.4.24/asdf.fas" > --> > Reading config "/home/nemo/.config/pusfofefe/config.lisp"... Config Loading ASDF on mobile _is_ slow, and there is nothing we can do about it, unfortunately. ASDF should therefore never be a dependency in a final app (there are ways to avoid it, even if some libraries want it to be present.) With Sailfish there is the problem that prebuilt ECL and EQL5 are still 32bit, so on my (quite recent) Sailfish 64bit phone, loading ASDF takes about 2(!) seconds. That would be less if 64bit compiled, I know from android, where loading ASDF on 64bit takes "only" about 1 second. Paul