Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

use expression_factory::parse_from_string not parse_expression in text formatting load_xml #1168

Closed
springmeyer opened this Issue · 5 comments

3 participants

@springmeyer
Owner

No description provided.

@springmeyer
Owner

@herm - was this in your plans? Were re-using the grammars in the fast_cast stuff but it appears we're not yet re-using grammers in the text formatting/placement from_xml parsing. Am I seeing that right?

@artemp
Owner

@herm did you have a chance to look into this ?

@springmeyer
Owner

It looks to me that being able to pass the grammar through is going to require some serious cleanup and refactoring of the new text formatting/placement stuff. @herm - can you comment on how you see this working?

@artemp
Owner

@herm @springmeyer

this line :

return boost::make_shared<text_node>(parse_expression(data, "utf8"));

expands to :

transcoder tr("utf8");
mapnik::expression_grammar<std::string::const_iterator> grammar(tr);
expression_ptr expr(boost::make_shared<expr_node>(false));
expression_factory::parse_from_string(expr, data, grammar);
return boost::make_shared<text_node>(expr);

which is expensive.

@herm herm closed this in 82d7a63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.