Commit Graph

9 Commits

Author SHA1 Message Date
hallgren
409f7ab3e3 gf -server: include grammar modification time in the info returned by /version 2015-04-17 13:21:20 +00:00
hallgren
ea6aa6dc02 PGF service: expire PGFs from the cache when they have been unused for 24 hours
...to keep memory use down on the server.
2014-07-21 15:53:38 +00:00
hallgren
3c110cbe8d gf -server: include list of loaded PGFs in version info 2014-05-12 13:45:36 +00:00
hallgren
923107506f PGF web service: disable caching of parse results
Caching parse results uses a lot of memory, even if they expire after
2 minutes, so it won't scale up to many simultaneous users.

But some excessive memory use seems to be caused by space leaks in
(the Haskell binding to) the C run-time system, and these should be fixed.
For example, flushing the PGF cache does not release the memory allocated
by the C run-time system when loading a PGF file.
2014-04-10 15:55:33 +00:00
hallgren
43e61a1e3b PGF web service: add unlexers and enable client side caching
Most PGF web API commands that produce linearizations now accept an
unlexer parameter. Possible values are "text", "code" and "mixed".

The web service now include Date and Last-Modified headers in the HTTP,
responses. This means that browsers can treat responses as static content and
cache them, so it becomes less critical to cache parse results in the server.

Also did some cleanup in PGFService.hs, e.g. removed a couple of functions
that can now be imported from PGF.Lexing instead.
2014-04-09 17:51:25 +00:00
hallgren
6cc8557e6b gf -server: add a command to manually flush the PGF cache
This can be used if the cloud service seems slow, but it would probably
be better to automatically expire unused PGFs from the cache after some time.
2014-03-19 16:15:05 +00:00
Sergei Trofimovich
05e5895134 ghc-7.6: allow directory-1.2
Get rid of old-time depend (and ClockTime in favour of UTCTime).
time-compat helps to retain backward compatibility with directory-1.1
and lower.
2013-03-09 21:38:43 +00:00
bjorn
dd17e7a2cc fastcgi: better grammar cache implementation: don't deadlock on exceptions 2008-10-20 08:24:01 +00:00
bjorn
e7656c9d2e (fastcgi) replace DataRef with a more general Cache type, which can hold several PGF grammars. 2008-10-17 14:12:53 +00:00