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
Upon investigation of performance issues, we found out that GenericSchema::schemaMap_ is a linear type container and thus methods GenericSchema::GetSchema() and GenericSchema::GetPointer() have O(n) complexity, yielding a huge performance impact on our application.
The text was updated successfully, but these errors were encountered:
This is indeed a map. Map (associative array/dictionary, etc.) has no implementation constraints. A map with a hash table is probably what you want to see.
But I suspect that nothing is going to change. Are you really able to confirm that GetPointer is the culprit for the performance issues?
You are right, my wording was not precise enough, by map I meant "efficient" map !
Yes, I used the perf tool to confirm that more than 60% of the time was spent in those functions; I bluntly inserted a std::map for GenericSchema::schemaMap_ and I got a x3 speedup and those functions disappeared from perf report.
If it's 60% of a large complex application, it's certainly a problem.
I believe you can implement your own SchemaDocument using the reference implementation but with std::map or std::hash_map. Or you can just patch the code :) .
Upon investigation of performance issues, we found out that
GenericSchema::schemaMap_
is a linear type container and thus methodsGenericSchema::GetSchema()
andGenericSchema::GetPointer()
have O(n) complexity, yielding a huge performance impact on our application.The text was updated successfully, but these errors were encountered: