Skip to content

build: optimize protobuf classes#7967

Merged
FineFindus merged 1 commit intolibre-tube:masterfrom
FineFindus:chore/optimiza-protobuf-classes
Nov 28, 2025
Merged

build: optimize protobuf classes#7967
FineFindus merged 1 commit intolibre-tube:masterfrom
FineFindus:chore/optimiza-protobuf-classes

Conversation

@FineFindus
Copy link
Copy Markdown
Collaborator

Currently, we keep all of NewPipeExtractors protobuf classes. This is overly broad as it disables all of R8's optimizations (e.g. it keeps unused fields and classes), however when not set, R8 removes all protobuf classes. R8 has an undocumented flag, which keeps and optimizes protobuf-generated classes. It also saves us from manually excluding all (new) protobuf classes.

While this currently has little impact, as all the generated protobuf classes are used, it will have a larger impact once #7689 is merged, which brings quite a few (unused) generated protobuf classes.

Ref: #7571
Ref: https://issuetracker.google.com/issues/144631039

Instead of keeping all protobuf-generated classes (which disables R8's
optimizations for that class), use the undocumented option  which keeps,
optimizes protobuf classes.

Ref: libre-tube#7571
Ref: https://issuetracker.google.com/issues/144631039
@FineFindus FineFindus merged commit 4f4f9d7 into libre-tube:master Nov 28, 2025
4 checks passed
@FineFindus FineFindus deleted the chore/optimiza-protobuf-classes branch November 28, 2025 12:58
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.

1 participant