Opened 10 years ago

Closed 10 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 by Nicklas Nordborg, 10 years ago

(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 by Nicklas Nordborg, 10 years ago

Status: newassigned

comment:3 by Nicklas Nordborg, 10 years ago

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