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

Change the method of IntList equals from toString to ListEquality.equals. In my case, codegen 15x faster #935

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

qpalwo
Copy link

@qpalwo qpalwo commented Jun 14, 2024

I have a 6000-line proto file, and it takes one minute to generate Dart code using the Dart proto plugin. After changing to the ListEquality.equals method, it only takes 4.6 seconds. If I completely remove the commentBlock call and compile it into an AOT (Ahead-of-Time) artifact, it only takes 200ms.

❯ time protoc --dart_out=./dart/lib1 test.proto
protoc --dart_out=./dart/lib1 test.proto 62.60s user 0.75s system 100% cpu 1:03.31 total
❯ time protoc --dart_out=./dart/lib1 --plugin=protobuf.dart/protoc_plugin/bin/protoc-gen-dart test.proto
protoc --dart_out=./dart/lib1 test.proto 4.61s user 0.32s system 125% cpu 3.918 total

Copy link

google-cla bot commented Jun 14, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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