[reorganize words about slow link times thomashartman1@gmail.com**20080905091021] addfile ./templates/happs-slow-linking-bug.st hunk ./templates/happs-slow-linking-bug.st 1 +

HAppS Slow Link Time Workarounds

+

+The fact that cabal-installing HAppS takes an hour is +officially a bug. Hopefully +this situation will be remedied as HAppS matures and, eventually, has +an official release. +

+I found this bug pretty problematic when I was experiencing it and I know I'm not the only one. +So, I will share some experiences and observations that will hopefully help others, +and maybe even help diagnose and eventually squash this bug. +

+First of all, you don't actually need to compile an executable to run a HAppS server, +and when you run from inside ghci the link time bug has no effect. So for a while I +was doing this, by loading ghci using ./hackInGhci.sh and then running runInGhci inside Main.hs. +

+Secondly, at some point this problem went away, and my link time dropped from 5-10 minutes to under 10 seconds. +

+This is definitely due to a change in my own code base, not HAppS repo code, since I am only +running against what I cabal installed and not the volatile HAppS library code in darcs. +At some point I intend to attempt a more precise diagnosis +by doing binary cuts on my repo and identifying the changes that seem +to have the biggest impact. I do have some suspicions. +

+ +

+ +The shell command ./runServer.sh, which creates an executable and starts the server, also times the compile & link, and rings a bell when it's done. Helpful if slow link times are creeping back in. hunk ./templates/run-tutorial-locally.st 8 -

The cabal installation may take up to an hour, mainly because the HAppS-Server installation is slow, but it should succeed in one shot. Incidentally, the fact that installing HAppS takes this long is arguably a bug. Hopefully this situation will be remedied as HAppS matures and, eventually, has an official release

+

The cabal installation may take up to an hour, mainly because the +HAppS-Server installation is slow, but it should succeed in one +shot. This is a symptom of the HAppS slow linking bug. hunk ./templates/run-tutorial-locally.st 18 -

  • Running the app: there are a couple of approaches, depending on what you want to do. -
    Mainly, if you are not a patient kind of person, you don't want to compile and link your app - ever time you make a change, because linking in HAppS can be slow. - I've seen linking of the tutorial code take up to ten minutes. - Oh, and it hogs memory like crazy, and the cpu gets hot and the fan goes into overdrive. - This is almost certainly a symptom of the same - HAppS slow linking bug mentioned above. -