fix MSS standalone renderer, fixing failing error handling tests after f6c07afee6
This commit is contained in:
parent
800122e1af
commit
16db1c5b03
@ -26,38 +26,36 @@ carto.Renderer.prototype.renderMSS = function render(data, callback) {
|
||||
}
|
||||
|
||||
var output = [];
|
||||
var styles = [];
|
||||
var time = +new Date();
|
||||
var parser = (carto.Parser(env)).parse(data);
|
||||
if (env.benchmark) {
|
||||
console.warn('Parsing time: ' + (new Date() - time) + 'ms');
|
||||
}
|
||||
var time = +new Date();
|
||||
var rules = parser.toList(env);
|
||||
time = +new Date();
|
||||
var rule_list = parser.toList(env);
|
||||
var rules = inheritRules(rule_list,env);
|
||||
if (env.benchmark) {
|
||||
console.warn('Rule generation time: ' + (new Date() - time) + 'ms');
|
||||
}
|
||||
var inherited = carto.inheritRules(rules,env);
|
||||
var time = +new Date();
|
||||
var sorted = carto.sortStyles(inherited,env);
|
||||
time = +new Date();
|
||||
var sorted = sortStyles(rules,env);
|
||||
if (env.benchmark) {
|
||||
console.warn('Sorted time: ' + (new Date() - time) + 'ms');
|
||||
}
|
||||
var time = +new Date();
|
||||
_(sorted).each(function(rule,idx) {
|
||||
var time_sty = +new Date();
|
||||
var style = new carto.tree.Style('style', rule.attachment, rule);
|
||||
for (var k = 0, rule, style_name; k < sorted.length; k++) {
|
||||
rule = sorted[k];
|
||||
style_name = 'layer' + (rule.attachment !== '__default__' ? '-' + rule.attachment : '');
|
||||
styles.push(style_name);
|
||||
|
||||
var time_to_xml = +new Date();
|
||||
// env.effects can be modified by this call
|
||||
output.push(carto.tree.Style.toXML(style_name, rule.attachment, rule, env));
|
||||
if (env.benchmark) {
|
||||
console.warn('Create style "' + idx + '": ' + (new Date() - time_sty) + 'ms');
|
||||
console.warn('Calling toXML for style "' + style_name + '" (#'+k + '): ' + (new Date() - time_to_xml) + 'ms');
|
||||
}
|
||||
if (style) {
|
||||
// env.effects can be modified by this call
|
||||
var time_to_xml = +new Date();
|
||||
output.push(style.toXML(env));
|
||||
if (env.benchmark) {
|
||||
console.warn('Calling toXML for style "' + idx + '": ' + (new Date() - time_to_xml) + 'ms');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (env.benchmark) {
|
||||
console.warn('Total Style toXML time: ' + (new Date() - time) + 'ms');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user