Merge changes I82f4d684,Ide34e48f,I5c76515a,I1c7b2053 into main

* changes:
  [res] Optimize name lookups in idmap service
  [res] Store the number of types in typeSpec
  [cleanup] Fix initializers order
  [cleanup] Preallocate memory in CollectionUtils