Redesign of dlang.org

Sönke Ludwig via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 10 03:42:14 PDT 2014


Am 10.06.2014 12:25, schrieb w0rp:
> On Tuesday, 10 June 2014 at 08:12:53 UTC, Sönke Ludwig wrote:
>> It's not heap allocations. The problem is that during CTFE, currently
>> basically every variable change allocates memory that is never freed
>> again. I've used a few tricks to get the memory usage down (which is
>> why the Diet compiler source code doesn't look very pretty), but
>> basically the only way to get reasonable memory use is to fix the D
>> front end.
>
> Indeed, this is a front end issue. I'm considering switching to markdown
> files loaded at runtime for many pages. So I can create only a few diet
> templates for basic layout, two column, generic changelog template, etc,
> and then load Markdown content at runtime and parse Markdown for
> generating the table of contents automatically.

If you go down the Markdown route*, let's extend the 
vibe.textfilter.markdown module to output structural information. 
Writing a Markdown parser in a way that doesn't use a cascade of regex 
patterns is definitely nothing I'd recommend anyone to try to do, unless 
absolutely necessary - it's awful.

* Are there any other opinions on this? I remember that there have been 
some strong proponents of using DDOC for things, so it would be bad if 
in the end Markdown were to be dropped, after all of the work has 
already been done. Personally I'd strongly favor Markdown, though.


More information about the Digitalmars-d mailing list