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

Speedup __ctx_to_str. #1319

Merged
merged 1 commit into from
Jun 26, 2021
Merged

Conversation

rchateauneu
Copy link
Contributor

Fixes #

Proposed Changes

@coveralls
Copy link

Coverage Status

Coverage remained the same at 75.705% when pulling bd96638 on rchateauneu:speedup_memory_store into 58b23fd on RDFLib:master.

@rchateauneu rchateauneu marked this pull request as ready for review May 17, 2021 12:50
Copy link
Member

@aucampia aucampia left a comment

Choose a reason for hiding this comment

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

Looks good to me. Would be interesting to know what the speedup is here, but good change even if it provided no speedup.

@rchateauneu
Copy link
Contributor Author

The speedup is between 0.5% and 1% when loading "orkg.nt"
g = Graph()
g.parse("orkg.nt", format="nt")

mem_org
mem

The profiles are obtained with:

py -3.6 -m cProfile -o mem.pstats import_orgk.py
py -3.6 gprof2dot.py -f pstats mem.pstats -o mem.dot
dot -Tpng -o mem.png mem.dot

FYI, using "%s:%s" is a bit faster.

Copy link
Contributor

@FlorianLudwig FlorianLudwig left a comment

Choose a reason for hiding this comment

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

even without any speedup, code is cleaner, LGTM :)

This was referenced May 21, 2021
@nicholascar nicholascar merged commit 48f2e4c into RDFLib:master Jun 26, 2021
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.

5 participants