(Slightly) optimize for common user case

Since GetBufferSizeFromProperties() is called from a loop which
iterates 8 times, we were making 24 system property queries, 8 of
which involve a std::string.

Now, in the common user case of a non-debuggable build, we only
make 2 system property queries, both for booleans which we cache.

While we could further cache the "persist.logd.size" and "ro.logd.size"
properties, optimizing the uncommon (and less speed critical)
case of debuggable automotive hardware isn't worth the (further)
loss of readability.

Bug: 327647503
Test: low_ram debuggable target has same size logcat buffer as before
Change-Id: I436a80bf8cf3eb4fdc2ddd606df8526ce04f2a15
1 file changed
tree: 9c3e8647d2c2bad17d8100dba524f23a0ec5c960
  1. liblog/
  2. logcat/
  3. logd/
  4. logwrapper/
  5. rust/
  6. OWNERS
  7. PREUPLOAD.cfg
  8. TEST_MAPPING