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

Added option to only run the compressor on a range of state groups in a room #44

Merged
merged 14 commits into from
Aug 12, 2021

Conversation

Azrenbeth
Copy link
Contributor

@Azrenbeth Azrenbeth commented Jul 22, 2021

BUILDS ON azren/added_graph_option (PR #43)

This allows the compressor to be called on only a selection of state groups in a room.

-b can be used to select the state group number to start compressing from
(entering 0 or omitting this will start at the first state_group in the room)

-n can be used to enter (roughly) how many state groups you wish to compress.

The compressor will print to stdout where it got up to. Entering this state group number
on the next run of the compressor will start from where the previous run finished

(NOTE: chunking produces worse compression than running all in one go, but will save memory)

@Azrenbeth Azrenbeth changed the title Azren/added chunking option Added option to only run the compressor on a range of state groups in a room Jul 30, 2021
@Azrenbeth Azrenbeth marked this pull request as ready for review August 4, 2021 10:23
Azrenbeth added 8 commits August 4, 2021 12:01
This will later be used to mark whether a state group should be
compressed or not
This will later get replaced with a min_state_group and a count of
the number of state groups you wish to process up to.
Added function to database.rs that scans through room to find the
id of the group in the room [groups_to_compress] after [min_state_group]

This is printed out as part of the output (and the compressor can be
continued by setting the min_state_group to this value).

Also added some documentation to the config options in lib.rs
No longer reports each time it needs to find a missing predecessor
@erikjohnston
Copy link
Member

erikjohnston commented Aug 5, 2021

NOTE - changes meaning of -s option from last state group to compress to first state group

Why are we removing the option? I'd much rather we kept it and used a different name for the new option? That way we retain backwards compat.

src/database.rs Outdated Show resolved Hide resolved
src/database.rs Outdated Show resolved Hide resolved
src/database.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/compressor.rs Show resolved Hide resolved
@Azrenbeth
Copy link
Contributor Author

Azrenbeth commented Aug 5, 2021

NOTE - changes meaning of -s option from last state group to compress to first state group

Why are we removing the option? I'd much rather we kept it and used a different name for the new option? That way we retain backwards compat.

I removed it because I thought "max_state_group" was there just to limit the number of groups you work on at once, which the chunking options replace with something better, and removing it simplified the code a bit. And since there's no reason not to run the compressor on the state groups of the most recent messages (cos changing their deltas won't take THAT long) I couldn't think of a reason to keep it.

(So mainly I just forgot to think about backwards compatability...!)

Anyway, I'll add it back in!

src/database.rs Outdated Show resolved Hide resolved
src/database.rs Outdated Show resolved Hide resolved
src/database.rs Outdated Show resolved Hide resolved
src/database.rs Outdated Show resolved Hide resolved
src/database.rs Outdated Show resolved Hide resolved
Co-authored-by: Erik Johnston <erikj@jki.re>
Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

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

woot

@erikjohnston erikjohnston merged commit 63e1d6e into matrix-org:main Aug 12, 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.

None yet

2 participants