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

ndb_json performance tweaks. #16

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Conversation

erichiggins
Copy link
Owner

Intended to resolve #15
Add internal caching. Hardcode instead of compute. Functions instead of obj methods. RegEx instead of loose date-string checks.

gaek/ndb_json.py Outdated
@@ -50,6 +52,9 @@
)


DATE_RE = re.compile(r'\d{4}[-/]\d{2}[-/]\d{2}')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would probably be faster if you anchored it to the beginning of the line (with '^'). I assume that would be a reasonable thing to do.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Done.

@erichiggins erichiggins self-assigned this Feb 3, 2017
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.

Improve performance of ndb_json module
2 participants