Skip to content

Computation cache #633

Description

@sbidoul

Some reports can be slow to compute.

When displaying the report, then using the drill-down feature, the recomputation time when navigating back from drill-down is painful.

We considered a drill-down in a new browser tab but that is not possible with Odoo.
#621 opens a pop-up but the ergonomics is poor and further navigation from there loses the benefit.

Related: #593

The compute method of mis.report.instance returns a json that could be cached.

The idea would be that

  • the compute method stores the result in a per instance / per context cache
  • the compute method returns the cached json if not too old
  • we empty the cache on any write on mis.report.instance or related objects (periods, template, kpis), but not on reported data (move lines, etc) - how to do that cleanly?
  • a cron purges the cache for old entries

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions