SchemaLoader.load very slow at runtime #2197
-
Hi I'm trying to parse some generated (in-memory) protobuf schemas to allow reading/writing of protobuf messages. I've used the RepoBuilder as an example of how to acheive this. Specifically, I'm using a SchemaLoader with a okio.Fakefilesystem. When I call After some digging, it seems to be locking inside CoreLoader. Here's a quick stack of where the issue occurs:
Am I doing something wrong here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
After trial and error, I've realised that wire-runtime wasn't on my classpath. I've added it, and the issue seems to have mysteriously stopped - but I can't explain why. If someone could validate that the above approach is valid / reasonable way of trying to achieve my goal, I guess I can write this one up to 🤷♂️ |
Beta Was this translation helpful? Give feedback.
-
Yeah that sounds good. We do something similar in Cash App to implement grpc-reflect. I suspect it needs wire-runtime for the built-in .proto files. One warning: our API stability for wire-schema has been much less stable than runtime things. We’ll try to keep this use-case in mind! |
Beta Was this translation helpful? Give feedback.
Yeah that sounds good. We do something similar in Cash App to implement grpc-reflect.
I suspect it needs wire-runtime for the built-in .proto files.
One warning: our API stability for wire-schema has been much less stable than runtime things. We’ll try to keep this use-case in mind!