-
Notifications
You must be signed in to change notification settings - Fork 0
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
Accessing ECClass information is slow when they come from large ECSchemas #601
Comments
Investigation notes The problem is not just with class hierarchy inspection, but also with getting classes for class grouping - that also requires us to get node's class, which requires downloading and parsing the schema. In the specific case of I tried the following approach:
Here we attempt to get the class using our schema provider, but at the same time (on next event loop iteration) we send out a metadata query to get the same information. In case we already have the schema, the metadata query is not even sent. In case we don't - both requests are sent and we wait for the first one to complete, with the expectation that metadata query is generally very quick. This did improve the performance slightly ( IMO, the next step for us should be to investigate possibility to avoid using |
Loading the and serializing to json for the RPC request does happen on the main thread. So this is blocking at the moment. Though we had hoped writing each schema was fast enough not to be a problem. I guess with these large schemas that does not hold true. For these performance numbers did you have RPC compression enabled and a proper async schema locater (one that returns schema info before loading the rest of the schema)? For an |
So compression shaved maybe a second or two off of the total time? I suspect the hang on the frontend is because we parse the 32MB json in one go. Schemas really shouldn't be this big. I agree we have to do better, let me see what we can come up with. |
Depends on the internet connection and how far is the data center. In this specific case, I'm running the test from Europe against EUS datacenter with a fairly slow internet connection:
So it definitely helps a lot. |
Our
ECClassHierarchyInspector
implementation is based onECSchemaProvider
. We create the provider usingSchemaContext
andECSchemaRpcLocater
, which always downloads the full schema from the backend. All of this means that simply checking is classX
is of classY
required fully downloading schemas of those two classes. And some schemas can be massive, taking up to 8 seconds or more to download.We should come up with a way to improve this. Maybe we could pre-load the schemas. Or, if we don't yet have the schema on the frontend, issue the schema request and an
ECDbMeta
query request at the same time and use the latter for the immediate response.Here's an example of getting the first Models tree branch performance. The green is our baseline, the brown - schemas are preloaded before the test.
The text was updated successfully, but these errors were encountered: