Opened 5 years ago

Closed 5 years ago

#726 closed enhancement (fixed)

Improve performance of counter on index page

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: Reggie v3.0
Component: net.sf.basedb.reggie Keywords:
Cc:

Description

We have made some improvements before, but with the current design it may still take several seconds to display all counters.

The new idea is to implement a "counter service" which performs the count in the background at regular intervals. The counts are cached on the server and can then be served with a single request that just returns a pre-formatted json object.

The service should not have to update the counter very often, but we should then also add a call from each servlet that make updates to set a flag for forcing a new count.

Change History (3)

comment:1 Changed 5 years ago by Nicklas Nordborg

(In [3059]) References #726: Improve performance of counter on index page

Added CounterService which now is responsible for all counting. It will update the counts at least once per hour, but it is possible to force an update earlier by calling CounterServer.setForceCount(). It is recommended that servlets, plug-ins and other code that modifies items do this.

From the index page a single request is now made and it will always return the already existing counts.

comment:2 Changed 5 years ago by Nicklas Nordborg

Status: newassigned

comment:3 Changed 5 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.