realm / realm-core

Core database component for the Realm Mobile Database SDKs
https://realm.io
Apache License 2.0
1.02k stars 165 forks source link

Optimize size of Node and Array #7992

Closed jedelbo closed 2 months ago

jedelbo commented 3 months ago

The size of Node and Array decresed from 64 and 128 to 56 and 112. Some redundant code removed in Spec class.

What, How & Why?

The second commit may fix #7847

☑️ ToDos

jedelbo commented 3 months ago

@tgoyne I was not able to reproduce the issue you described in #7847 on my machine, so I am not able to tell if this PR actually fixes it. Can you help here?

tgoyne commented 3 months ago

This cuts the -O0 stack space used on the recursive path a bit so it'll reduce the maximum stack space required for an index update. There isn't really a clear answer to if it's by enough.

coveralls-official[bot] commented 3 months ago

Pull Request Test Coverage Report for Build jorgen.edelbo_406

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/realm/index_string.cpp 59 61 96.72%
<!-- Total: 82 84 97.62% -->
Totals Coverage Status
Change from base Build 2575: 91.1%
Covered Lines: 217348
Relevant Lines: 238556

💛 - Coveralls
jedelbo commented 2 months ago

@ironage please have a second look. I have made some more changes.