Bug 785034 - Rapid key navigation causes backlog of TM queries
Summary: Rapid key navigation causes backlog of TM queries
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Performance
Version: 1.4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Sean Flanigan
QA Contact: Alex Eng
URL:
Whiteboard:
Depends On:
Blocks: zanata-1.5.0
TreeView+ depends on / blocked
 
Reported: 2012-01-27 02:51 UTC by Sean Flanigan
Modified: 2012-03-07 00:06 UTC (History)
3 users (show)

Fixed In Version: 1.5.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-07 00:06:52 UTC
Embargoed:


Attachments (Terms of Use)

Description Sean Flanigan 2012-01-27 02:51:35 UTC
Description of problem:
Using the keyboard (Alt+J/K), it is possible to move quickly between text flows.  Each movement triggers a TM search, but the server (or the event bus) has trouble keeping up with the searches and their results.

Version-Release number of selected component (if applicable):
1.4.5

How reproducible:
Very easy, especially on slower connections.

Steps to Reproduce:
1. Press Alt+K many times in a row to move down 20 rows or so
2. Watch the TM area
  
Actual results:
Even after navigation has stopped, the TM panel keeps updating to show TM results for different rows of the table for some time.  In some cases, it stops before showing the last TM result.

Expected results:
If it can't keep up, the TM should jump straight to the last results.

Additional info:

We should avoid having the client generate so many TM requests when navigating quickly, but the server should also be able to skip over obsolete TM requests, and jump straight to the last one.

Comment 1 Sean Flanigan 2012-02-23 03:23:39 UTC
Modified the client so that it waits for TM results before submitting any more TM requests.

While working on this bug, I found that the query in TextFlowDAO.getIdsByTargetState was not taking into account obsolete HProject/Iterations.  Fixing this bug made the query even slower, so I had to do some performance tuning on the server as well.

I enabled Hibernate's second-level cache for entities, and the query cache, also implemented a time-based cache for TextFlowFilter for use with Hibernate Search.  

Commits:
https://github.com/zanata/zanata/commit/ef61cb28348ebb7100fd190ee8a06a3b1fa37bb0
https://github.com/zanata/zanata/commit/338f3290ebb026245ad44c34242e51d0811d0af2
https://github.com/zanata/zanata/commit/a29c9e508ae1a5e5f28fb7417d438a8f0958c600
https://github.com/zanata/zanata/commit/18801bd24f5db26bf9c6138e22764185f8a03698
https://github.com/zanata/zanata/commit/05f3e41d2ec0ed9b8680e7334aa5512c9365abbf

Comment 2 Alex Eng 2012-02-27 06:26:20 UTC
VERIFIED in Zanata version 1.5.0-alpha-3-SNAPSHOT (20120227-1458)


Note You need to log in before you can comment on or make changes to this bug.