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

loaddata: Allow increasing the size of submitted files #7016

Closed
wants to merge 1 commit into from

Conversation

legoktm
Copy link
Member

@legoktm legoktm commented Oct 18, 2023

Status

Ready for review

Description of Changes

This would make it easier to get rough benchmarks of encryption steps.

This is pretty quick/rough, not sure if there's a better way we want to go about this. Note that this would need to be manually applied to a 2.6.0 install to get numbers for gpg.

Testing

How should the reviewer test this PR?

  • Try time ./loaddata.py --file-size 500000000, etc.

Deployment

Any special considerations for deployment? No

Checklist

  • Linting (make lint) and tests (make test) pass in the development container

This would make it easier to get rough benchmarks of encryption steps.
@legoktm legoktm requested a review from a team as a code owner October 18, 2023 18:47
@@ -202,7 +202,7 @@ def submit_file(source: Source, journalist_who_saw: Optional[Journalist]) -> Non
source.interaction_count,
source.journalist_filename,
"memo.txt",
io.BytesIO(b"This is an example of a plain text file upload."),
io.BytesIO(b"A" * size),
Copy link
Contributor

Choose a reason for hiding this comment

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

We compress then encrypt, so this will compress down to pretty much nothing before further processing, making it less useful for timing encryption or file transfers. Consider adding some randomness?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, good point. Also there's a lot of overhead from SecureTemporaryFile. Maybe just a simple benchmarking script that just benchmarks exactly what we want (GPG vs redwood) would be better. Let me try to come up with something...

@legoktm
Copy link
Member Author

legoktm commented Oct 26, 2023

I don't want to merge this anymore. I created a separate benchmark script, which we could or could not merge, but IMO probably not.

@legoktm legoktm closed this Oct 26, 2023
@legoktm legoktm deleted the loaddata-variable-size branch October 26, 2023 21:04
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