You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@grigasp has run into performance issues when loading large schemas on the frontend for presentation: iTwin/presentation#601
Recent improvements have helped but for large schemas it's unlikely that an async incremental way to load schemas would improve startup time.
ecschema-metadata has the delayed promise abstraction around schema items but the implementation loads the entire schema at once. We should investigate an implementation that incrementally loads the schema using ECSql.
schema key + reference schema keys - This is enough to return the SchemaInfo for a schema
SchemaItem names - This is enough to create the schema item keys and hopefully construct the lazy loaded schema item
chunks of schema item bodies - We don't want to make an HTTP call for each schema item, that would be too many calls even for a small schema. We can investigate a single query that loads all dependencies for a given item. Loading all base classes for a class is easy to do, but what about all other dependencies?
Goals of this investigation
Is the current Lazy Load/DelayedPromise paradigm the correct one to use?
Can we efficiently incrementally load schemas?
Can we load enough to answer some important questions quickly then use other mechanisms to load the rest of the schema?
Suggestion how to proceed
The text was updated successfully, but these errors were encountered:
Load all schema item infos (a concept similar to SchemaInfo) which have item key plus key of referenced items
When a schema item is requested use SchemaItemInfo for that item to walk the tree of what referenced items are needed so a single request can be made to load all those items. Partially loaded schema knows what is already loaded so tree list of referenced items will only include those not yet loaded.
Consider adding other items to request if request is small to further reduce requests for very flat schemas
Consider loading units, koqs, formats, enums, structs or some of those on first load so list of referenced items doesn't have to go down to property level.
Consider filling requests using ECSql ECDbMeta queries instead of in memory C++ schemas regardless of schema being loaded from frontend or backend
@grigasp has run into performance issues when loading large schemas on the frontend for presentation: iTwin/presentation#601
Recent improvements have helped but for large schemas it's unlikely that an async incremental way to load schemas would improve startup time.
ecschema-metadata has the delayed promise abstraction around schema items but the implementation loads the entire schema at once. We should investigate an implementation that incrementally loads the schema using ECSql.
Goals of this investigation
The text was updated successfully, but these errors were encountered: