-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
Description
Hello,
(I recently noticed this issue, but I did not investigate further)
Currently (after a whole semester), when the learn-ocaml Docker container is restarted or recreated, the startup takes a very long time (around 2'30) and during that time, the server is offline, which is quite annoying.
cf. the following log:
2020-03-29T12:15:19.994597000Z Learnocaml v.0.12 running.
2020-03-29T12:15:19.994991000Z Updating app at ./www
2020-03-29T12:15:20.250270000Z test (no changes)
2020-03-29T12:15:20.250972000Z exo-dm1 (no changes)
2020-03-29T12:15:20.251488000Z exo-dm2 (no changes)
2020-03-29T12:15:20.251986000Z exo-theme10 (no changes)
2020-03-29T12:15:20.252444000Z exo-theme5 (no changes)
2020-03-29T12:15:20.252882000Z exo-theme6 (no changes)
2020-03-29T12:15:20.253311000Z exo-theme7 (no changes)
2020-03-29T12:15:20.253749000Z exo-theme8 (no changes)
2020-03-29T12:15:20.254189000Z exo-theme9 (no changes)
2020-03-29T12:15:20.254620000Z exo-tp1 (no changes)
2020-03-29T12:15:20.255119000Z exo-tp2 (no changes)
2020-03-29T12:15:20.255571000Z exo-tp2bis (no changes)
2020-03-29T12:15:20.267962000Z Learnocaml server v.0.12 starting on port 8080
2020-03-29T12:17:53.535157000Z Found the following teacher tokens:
2020-03-29T12:17:53.535884000Z - REDACTED
[…]
I'm not sure but I guess the bottleneck is the following line:
learn-ocaml/src/server/learnocaml_server.ml
Line 512 in 145fabc
| Token.Index.get () >>= function tokens -> |
@yurug did you experience a similar issue?
anyway, maybe we could consider slightly changing the architecture of learn-ocaml's persistent data (e.g. by caching/storing the teachers token in another place?) so that that step is immediate…