Details
Description
We have some departments other than development using XPlanner for time
tracking. As they aren't following XP practices, the number of time
entries for tasks can get really large and hence the time edit page
takes a long time to load. I looked into the issue and found that the
PersonOptionsTag was not using the query cache when getting all people
in the db for the select boxes.
The following simple change would allow the query cache to be used:
private List fetchAllPersons() throws HibernateException {
Query query = getSession().createQuery("from object in
"+Person.class+" order by object.name where object.hidden = false");
query.setCacheable(true);
return query.list();
// existing code
//return getSession().find("from object in "+Person.class+"
order by object.name where object.hidden = false");
}
Another idea is to add pagination to the time entry page - any thoughts
on this?
Reagrds,
tracking. As they aren't following XP practices, the number of time
entries for tasks can get really large and hence the time edit page
takes a long time to load. I looked into the issue and found that the
PersonOptionsTag was not using the query cache when getting all people
in the db for the select boxes.
The following simple change would allow the query cache to be used:
private List fetchAllPersons() throws HibernateException {
Query query = getSession().createQuery("from object in
"+Person.class+" order by object.name where object.hidden = false");
query.setCacheable(true);
return query.list();
// existing code
//return getSession().find("from object in "+Person.class+"
order by object.name where object.hidden = false");
}
Another idea is to add pagination to the time entry page - any thoughts
on this?
Reagrds,