Skip to content

don't render templates if the template tag is blank#159

Open
PetrDlouhy wants to merge 1 commit intocaktus:masterfrom
PetrDlouhy:performance-improvements
Open

don't render templates if the template tag is blank#159
PetrDlouhy wants to merge 1 commit intocaktus:masterfrom
PetrDlouhy:performance-improvements

Conversation

@PetrDlouhy
Copy link
Contributor

Partial fix for #158

The rendering of templates take ~10ms per scribble even if it's content is completely blank.
This returns simply blank DIV in that case. Other changes are just rearranging order of commands, that shouldn't have influence on data processing.

This introduces small incompatibility - if the template was overriden by user, the blank output could differ. I would probable rewrite this, so that it would generate blank content once at startup.

@coveralls
Copy link

coveralls commented Nov 19, 2020

Coverage Status

Coverage decreased (-94.2%) to 0.0% when pulling 223c1a1 on PetrDlouhy:performance-improvements into f5fdf74 on caktus:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-94.2%) to 0.0% when pulling e2784c5 on PetrDlouhy:performance-improvements into f5fdf74 on caktus:master.

@PetrDlouhy PetrDlouhy force-pushed the performance-improvements branch from e2784c5 to 223c1a1 Compare November 20, 2020 08:22
@PetrDlouhy
Copy link
Contributor Author

I have added generating the blank scribble content at startup, and also moved loading of the template to global level, so it is done only once.

@PetrDlouhy
Copy link
Contributor Author

@ronardcaktus Could you please also look at this small optimization?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants