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

Replace gob encoding with own writing to hash. #15

Merged
merged 6 commits into from
Jan 30, 2025
Merged

Conversation

s-l-teichmann
Copy link
Contributor

@s-l-teichmann s-l-teichmann commented Jan 23, 2025

As we already do a recursive re-coding to make gob usable instead
we can directly write to the hash during the recursion.

This makes a difference. On my machine:

main branch using gob:

> /usr/bin/time -f '%E' ./fakedoc \
   -o large.json -size 0.001  -l ../../limits.json \
   -seed pcg:81c43e3f5d1b81f2:8cc495feb113a405
0:29.03

This branch using direct hashing:

> /usr/bin/time -f '%E' ./fakedoc \
   -o large.json -size 0.001  -l ../../limits.json \
   -seed pcg:81c43e3f5d1b81f2:8cc495feb113a405
0:22.21

As we already do a recursive re-coding to make gob useable
we write to the hash directly.
@s-l-teichmann s-l-teichmann removed the request for review from bernhard-herzog January 24, 2025 08:13
@bernhardreiter
Copy link
Member

addresses #18 , in one case from 8 minutes to 30 seconds

@bernhardreiter bernhardreiter linked an issue Jan 28, 2025 that may be closed by this pull request
Copy link
Contributor

@koplas koplas left a comment

Choose a reason for hiding this comment

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

LGTM

@s-l-teichmann s-l-teichmann merged commit f94e4de into main Jan 30, 2025
@s-l-teichmann s-l-teichmann deleted the remove_gob branch January 30, 2025 08:22
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.

fakedoc too slow
3 participants