Counter cache removed in develop (performance)


I just merged Tomer's patch which removes counter_cache fields.

This was preliminary optimization, we have been able to optimize most
counter calls and SQL database should now take care of all the counting.
This fixes two major issues:

  • database deadlocks
  • incorrect values presented

This could come with some performance penalties, but we haven't measured
significant increase. On the other hand, concurrent performance when
creating hosts or sending reports in parallel should be increased.

If you have an instance with production data copy and you can test the
next nightly build on that, please share your results in the thread
(ideally before-after numbers). We are most interested in:

  • batch host creation
  • facts uploads
  • index pages
  • API/CLI commands


··· -- Later, Lukas #lzap Zapletal