Open MattHeard opened 10 years ago
First, log messages for every query, create, read, update, and delete.
Being logged in appears to cause an approximately 30 extra queries. Why?
I have made a spreadsheet with the current number of operations for each action:
https://docs.google.com/spreadsheets/d/18fm1pLCo502Sl2MWKbUQvqnYstClUhza5dprWeeemXQ/edit?usp=sharing
When logged in, the /preferences
page performs about 142 queries and 70 read operations. WHY?!
On the latest test, when /preferences
is accessed:
Model.countMatchingEntities()
calls PreparedQuery.countEntities(FetchOptions fetchOptions)
70 times,Notification.countNewNotificationsForRecipient(final String recipientId)
calls PreparedQuery.countEntities(FetchOptions fetchOptions)
2 times, andModel.getSingleEntity(final PreparedQuery preparedQuery)
calls PreparedQuery.asSingleEntity()
70 times.Commit 5333546791e12f92188c4b131e73b6fd2ee35ea3 produced the following changes: