[metapost] Running mpost as a unix daemon?

Dave Crossland dave at lab6.com
Thu Feb 20 00:00:46 CET 2014


Hi!

https://github.com/metapolator/metapolator/ is a font family editor
application, which calls mpost

This means the application is slow, because in
https://github.com/metapolator/metapolator/blob/master/metapolator/views.py#L876
we use the Python standard library's subprocess.Popen and incur a long
startup time each time it is run.

Non-Solution: Jonathan Fine's
https://bitbucket.org/jfine/tex-daemon/src/default/texd/py/metapost/metapostdp.py
looked like it might speed things up, but it seems it won't because it
isn't really a metapostd, but a wrapper that makes metapost appear
like a daemon, but still starts up metapost each time with
subprocess.Popen on
https://bitbucket.org/jfine/tex-daemon/src/default/texd/py/tex/util.py#83

I see 3 options for making this work as a daemon:

Option: Write a new C/C++ unix daemon 'metapostd' in C, to run MPLib
as so there is no start up time

Option: Write a python binding for MPLib, to access metapost
calculations directly from Python

Option: Write a nodejs binding for MPLib, to access metapost
calculations directly from node

I wonder what the metapost community thinks about these options -
which would be most widely useful?

I'd love it if we could make a metapostd in python, but not sure its possible.

-- 
Cheers
Dave



More information about the metapost mailing list