Hi,
I am trying to use Parser.HTML instead of parser_html for Camas. However I have the too deep recursion error with the default layout. After looking at the code it looks like the default recursion depth is 10 while I need at least 13. So I set MAX_FEED_STACK_DEPTH to 20 in modules/Parser/html.c and it works.
I would like to know if it is possible to increase this value given that I don't have an extremely strange RXML code, just a little complex, and that it works with parse_html.
-- David Gourdelier
Woho! I would say that a recursion of even 2 or 3 is too deep and that the setting in the html parser is sufficient. It sounds like a big waste of resources to generate and parse HTML 13 times instead of doing it right the first time.
/ Martin Nilsson (gitarrmusik)
Previous text:
2003-06-21 15:33: Subject: Parser.HTML and stack depth
Hi,
I am trying to use Parser.HTML instead of parser_html for Camas. However I have the too deep recursion error with the default layout. After looking at the code it looks like the default recursion depth is 10 while I need at least 13. So I set MAX_FEED_STACK_DEPTH to 20 in modules/Parser/html.c and it works.
I would like to know if it is possible to increase this value given that I don't have an extremely strange RXML code, just a little complex, and that it works with parse_html.
-- David Gourdelier
/ Brevbäraren
right,
one of the common problems i see in code is that people return rxml tags as a result of handling a tag.
eg, doing
return("<true>");
is a waste of resource, one should instead return what <true> would usually evaluate to.
same goes for any other rxml being returned.
i am not sure if it is possible to simply access tag functions by name like:
return id->tags->true();
something like this in caudium and roxen would be convenient.
In Roxen you have access to all the tag objects in the parser, so you can call then manually. I'm sure you can get hold of the tag functions (they are still functions, right?) in caudium somehow.
/ Martin Nilsson (gitarrmusik)
Previous text:
2003-06-21 16:09: Subject: Re: Parser.HTML and stack depth
right,
one of the common problems i see in code is that people return rxml tags as a result of handling a tag.
eg, doing
return("<true>");
is a waste of resource, one should instead return what <true> would usually evaluate to.
same goes for any other rxml being returned.
i am not sure if it is possible to simply access tag functions by name like:
return id->tags->true();
something like this in caudium and roxen would be convenient.
/ Brevbäraren
Indeed but that's old code that will be removed in the future but we need to have it working for compatibility reasons.
/ David Gourdelier
-------------------
Woho! I would say that a recursion of even 2 or 3 is too deep and that the setting in the html parser is sufficient. It sounds like a big waste of resources to generate and parse HTML 13 times instead of doing it right the first time.
/ Martin Nilsson (gitarrmusik)
Previous text:
2003-06-21 15:33: Subject: Parser.HTML and stack depth
Hi,
I am trying to use Parser.HTML instead of parser_html for Camas. However I have the too deep recursion error with the default layout. After looking at the code it looks like the default recursion depth is 10 while I need at least 13. So I set MAX_FEED_STACK_DEPTH to 20 in modules/Parser/html.c and it works.
I would like to know if it is possible to increase this value given that I don't have an extremely strange RXML code, just a little complex, and that it works with parse_html.
-- David Gourdelier
/ Brevbäraren
*reading manual* parser_obj->max_parse_depth(17) should do it.
/ Mirar
Previous text:
2003-06-21 15:33: Subject: Parser.HTML and stack depth
Hi,
I am trying to use Parser.HTML instead of parser_html for Camas. However I have the too deep recursion error with the default layout. After looking at the code it looks like the default recursion depth is 10 while I need at least 13. So I set MAX_FEED_STACK_DEPTH to 20 in modules/Parser/html.c and it works.
I would like to know if it is possible to increase this value given that I don't have an extremely strange RXML code, just a little complex, and that it works with parse_html.
-- David Gourdelier
/ Brevbäraren
Yes it works, thank you.
/ David Gourdelier
-------------------
*reading manual* parser_obj->max_parse_depth(17) should do it.
/ Mirar
Previous text:
2003-06-21 15:33: Subject: Parser.HTML and stack depth
Hi,
I am trying to use Parser.HTML instead of parser_html for Camas. However I have the too deep recursion error with the default layout. After looking at the code it looks like the default recursion depth is 10 while I need at least 13. So I set MAX_FEED_STACK_DEPTH to 20 in modules/Parser/html.c and it works.
I would like to know if it is possible to increase this value given that I don't have an extremely strange RXML code, just a little complex, and that it works with parse_html.
-- David Gourdelier
/ Brevbäraren
pike-devel@lists.lysator.liu.se