-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL cache: enable WAL (Write Ahead Logging) by default #5843
Conversation
✅ Deploy Preview for apollo-android-docs canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong opinion here. Without a clear benchmark showing improvement, I'd probably err on the side of leaving things untouched. I'll leave it to you though.
Running this particular benchmark a few times, I can see a ~12% improvement when using WAL (same with the incubating version of the same test). Confidence is not ultra high however because I get a 8-15% variation between each test. |
Sorry for the drive-by, but we are currently focused on app performance improvements, so we are quite invested in these topics. Just curious, what device did you run the benchmark on? Could there have been external factors on the device that introduced the variation? Btw, there's also this great article from P-Y that could help: https://blog.p-y.wtf/statistically-rigorous-android-macrobenchmarks. Also, using a rooted device should help, at least according to the documentation: https://developer.android.com/topic/performance/benchmarking/microbenchmark-overview#lock-clocks. I hope this helps, and I am not being annoying xD |
Hey @eduardb no worries at all, quite the contrary! Advice on this topic is very much welcome and appreciated. This is also a hot topic for us currently. Thanks for the article link, a very good one indeed. The spreadsheet template is promising. My methodology was a lot more naive: ran the test 6 times each (with/without WAL), discarded the lowest and highest values, and looked at the averages. |
Well, after running the benchmark (a tweaked version of this one) 40 times, and with the help of the template from PY's article, I see an improvement of only ~1%, which is not really significant (results here). Closing this one - users can still opt-in for WAL in their app if wanted, via the |
WAL has shown performance gains when executing many independent inserts (see #5834).