Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
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