Commit Graph

11 Commits

Author SHA1 Message Date
Krasimir Angelov
8ac0d881ed the server must checkout the grammar if an .ngf file changes 2022-06-16 18:20:18 +02:00
Thomas Hallgren
86066d4b12 Eliminate the dependency on time-compat
It was only needed for compatibility with directory<1.2, but
directory>=1.2 has been shipped with ghc since ghc-7.6.

Note: time-compat-1.9.* (the current version) is a completely different
package, that does not provide the needed function toUTCTime, which
was provided in time-compat-0.1.*.
2019-05-15 12:05:38 +02:00
hallgren
3263968c79 gf -server: include grammar modification time in the info returned by /version 2015-04-17 13:21:20 +00:00
hallgren
3660339b23 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
7c9ff164bf gf -server: include list of loaded PGFs in version info 2014-05-12 13:45:36 +00:00
hallgren
4008a2b111 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
d1da0e06de 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
b061d59044 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
0173b5f4ff 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
d205011470 fastcgi: better grammar cache implementation: don't deadlock on exceptions 2008-10-20 08:24:01 +00:00
bjorn
0205f341f5 (fastcgi) replace DataRef with a more general Cache type, which can hold several PGF grammars. 2008-10-17 14:12:53 +00:00