Comments (14)
If that's the only blocker we could fork and fix, and add the fork as a git dependency.
from plutus.
I did some debugging of this a while ago (I think it's the same issue that's affecting our doctests). You can gdb attach to the process and get a stack trace, which I think indicated that it was definitely something in module loading.
However, I also had a look and I'm pretty sure we're using dynamically linked libraries, but I'm not an expert on this so I might have got this wrong (I think I just looked at the output of ldd on things, and it looked like there were lookup paths).
from plutus.
Hmm, currently we can't use ghc 8.6 because of eskimor/servant-subscriber#19 so I will try a hint-only project to see at least if this will solve it in the future. Try ghci first though.
from plutus.
So, with servant subscriber fixed (I have submitted a PR) we are now blocked by https://ghc.haskell.org/trac/ghc/ticket/16104 which will no doubt take quite a few months before it is available to us (we want it in a stackage LTS really). See #461
I will move on to GHCI
from plutus.
so on a machine where the server warmup takes almost 1 minute, ghci loads files in less than 1 second and takes less to start up. This is using the same ghc lib dir as hint is using. The only difference between this test and hint is that hint is running within a Haskell process which maybe causes some contention in the way ghc is loading things. I think this test is successful enough to move on to trying to embed ghci in the haskell server and see what happens.
from plutus.
Yes, that makes sense - it's also the case that I've been able to use ghci-as-a-process just fine in the projects where the doctests are slow, so it does seem to be something about using it as a library.
from plutus.
This is bizarre in so far as ghci
also just uses GHC as a library. (However, I am not objecting to the plan. Tracking down whether it is due to hint
or some other incidental difference in how GHC gets configured may be very time consuming and maybe just going for the simple solution is the easiest approach and simplifies maintenance in the long run.)
from plutus.
Currently I'm actually looking at runghc
as dealing with a single session of ghci will be very complicated in terms of parsing the output. A quick play around of runghc
on the command line with some of our contracts showed it to have an unnoticeable performance difference and running a single command per server request is much easier
from plutus.
This is fixed by moving from hint to runghc
from plutus.
This is now merged, tested and pending release. See #514.
from plutus.
FWIW, the other workaround is to compile the executable which uses the GHC API using -dynamic
.
from plutus.
@mpickering oh really, wow. I think runghc is currently a better solution anyway as it allows spawning as many processes as we require and seems to have almost no overhead.
from plutus.
@mpickering can you explain why? or is it just magic :D
from plutus.
It's not clear yet but it's something to do with using the system linker vs the linker built into GHC.
See https://gitlab.haskell.org/ghc/ghc/issues/15524
from plutus.
Related Issues (20)
- Add ghc910 builds to hydraJobs
- Simple and efficient way of accessing the datum and redeemer
- HasBlueprintSchema, HasBlueprintDefinition instances for types shipped with Plutus, e.g. `PubKeyHash`
- Get rid of `delay`s in `case` branches
- Make tests take less than forever to finish
- Replace `NOINLINE` with `OPAQUE`
- Add a `MINIMAL` pragma to `Ord` and check existence of other `MINIMAL` pragmas
- No instance for ‘PlutusTx.Eq.Eq ScriptPurpose’ arising from a use of ‘lookup’ HOT 5
- Use Custom Domain for GithubPages
- Restore master haddock branch
- Add the new bitwise builtins to `plutus-metatheory`
- Add the new bitwise builtins to the Plutus Core specification
- Plutus Core specification: be careful about sizes of builtin arguments of integral types
- Update outdated docs in budgeting benchmarks of `Text`
- documentation for costing changes in plutus v3 HOT 9
- Upscale `QuickCheck` tests in the nightly test suite
- Revive auto generation of the compiler option table
- Add a page explaining different script purposes
- RIPEMD-160 for Chang+1
- Fix `writeBits` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plutus.