On Tue, 28 Oct 2014 21:24:06 +0100, Jacob Carlborg wrote:

On 2014-10-27 07:58, Sönke Ludwig wrote:

Technically it would be very simple if DDOX is used as a library.
Contrary to what I initially thought, it also wouldn't be necessary to
play around with virtual environments for security, because instead of
actually building the project with JSON output it should be sufficient
to just run DDOX with its dparser (the one used for Dscanner) based back
end.

Ok, cool.

The only thing is that for efficiency reasons, it would probably be a
good idea to also implement serialization functionality for the internal
AST, so that it can be stored in the database instead of constantly
reparsing or storing everything in memory (or maybe a fixed size cache
is enough for now).

Hmm, I was just thinking it would generate the HTML once for each
package and version and store it on disk. Then just serve the static
HTML pages. You had something else in mind?

My idea was to use the same integrated serving as for http://vibed.org/api/. One advantage this would have is that it is much less expensive in terms of disk space and I/O, as well as in general preprocessing time. The full API documentation for vibe.d for example takes something around 2500 files in 30MB, so this could get costly pretty quick.