in reply to Too difficult for me...

simonodell:

After reading your node, I get the impression[1] that you've written your own language based on tags, and your program interprets the tree each time you want to generate a page. I'm thinking that the problem may be that you're reparsing your tree and interpreting the result for each page. Perhaps you should make a preprocessor that will take your tree and generate a program that directly generates the output, something like a compiler.

If you do this, then you can use the standard profiling tools to find out what parts of the code are taking too long. This would enable you to ask smaller, more detailed questions about specific chunks of code, and would help you find out which parts of your compiler need the most work.

Notes:

[1] I found the post hard to read because it doesn't get to the point quickly enough, so I may have missed something important. If so, sorry.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: Too difficult for me...
by jdrago999 (Pilgrim) on Jul 24, 2011 at 05:13 UTC
    Perhaps you should make a preprocessor that will take your tree and generate a program that directly generates the output, something like a compiler.
    Yes I agree that's how it should be done. If the original is newer than the "compiled" version, then re-parse/re-compile.
Re^2: Too difficult for me...
by simonodell (Acolyte) on Jun 19, 2011 at 13:32 UTC
    I'm not trying to win anyone over, I'm trying to share what I have.

    I've spent a lot of time working at the abstract level provided by the syntax, and I have looked at other templating systems and I find their syntax to be very cumbersome, restrictive and clunky.

    The syntax rocks, my implementation sucks. So I have a choice, keep it all to myself and work out the problems the hard way over however long that takes, or let my baby go out into the world by itself and allow others to do their magic with it.

    I've already put in thousands of hours of my time, I'm not after kudos, congratulations, slaps on the back or anything like that. I just want to share it openly and receive back the benefit of letting other programmers who are wiser and smarter I, working on the problem.

    If I can't convince anyone that what I have worked on for the last few years is of any worth at all, then I will just have to spend the next few years on it as well, and I'm not being a stubborn jerk or anything, I just know what it's like to work within the paradigm and nothing I find elsewhere comes close.

    It's these 3 simple rules, and then the programmer does whatever he/she want's with it... it doesn't have to have an extensive set of commands, or anything like that, I'm not trying to suggest I have an all singing all dancing solution to everything!

    I'm just hoping that someone will grasp the syntax structure and play with it, I'm guessing at this point what I need to do is produce the video file I mentioned earlier and then let people directly download the source code I have already written. Maybe then if they see what it's about and why its so neat an efficient compiler/parser can get written this side of 2016.