Bug 869084

Summary: [WebTrans] Too slow to load a big document that has >7000 text flows
Product: [Retired] Zanata Reporter: Ding-Yi Chen <dchen>
Component: PerformanceAssignee: Patrick Huang <pahuang>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: high Docs Contact:
Priority: unspecified    
Version: developmentCC: pahuang, zanata-bugs
Target Milestone: ---   
Target Release: 2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.8.0-SNAPSHOT (20121025-0030) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-07 06:18:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ding-Yi Chen 2012-10-23 01:56:01 UTC
Description of problem:
It takes quite a long time to load a big document with many translation

The project I use is freeciv
http://freeciv.wikia.com/wiki/Main_Page

whose translation can be found here:
http://www.cazfi.net/freeciv/translations/S2_5/

This project have over 7200 text flows.


Version-Release number of selected component (if applicable):
Zanata version 1.8.0-SNAPSHOT (20121023-0030)

How reproducible:
Always

Steps to Reproduce:
0. Create project freeciv, version master if you have not.
1. Download the pl.po.bz2, zh_CN.po.bz2, zh_TW.po and freeciv.pot from 
http://www.cazfi.net/freeciv/translations/S2_5/
2. Unzip the bz2 files
3. Write a zanata.xml file which specifies that pl, zh_CN, zh_TW will be pushed
4. zanata push with translation.
5. Sign in to Zanata
6. Visit the pl, zh_CN, and zh_TW for freeciv
  
Actual results:
Google Chrome 15.0.874.121
pl polish translation: 
   Loading: 1:26 minute
   (translated: 77899, fuzzy: 8230)

zh-CN Simpified Chinese translation: 
   Loading: 1:32 minute
   (translated: 13127, fuzzy:20492)

zh-TW Traditional Chinese translation:
   Loading: 1:20  minute
   (translated: 6072, fuzzy:0)

Firefox is about the same.

And it seems that database backend does not matter, as H2 and MySQL roughly took the same amount of time.


Expected results:
Loading is done within 30 seconds

Additional info:
Once it finish loading, the responding time for editing and page switching  are normal.

Comment 1 Patrick Huang 2012-10-24 00:21:00 UTC
committed into master:
https://github.com/zanata/zanata/commit/f75429ea6a4d5136c9ba6b4cef204af6a9d600c5

reduced load time from several minutes to less than 1 second

Comment 2 Ding-Yi Chen 2012-10-24 23:28:52 UTC
VERIFIED with Zanata version 1.8.0-SNAPSHOT (20121025-0030)

Now open the first page require 4 secs, and page switch now take about 3 seconds.

Comment 3 Sean Flanigan 2012-11-07 06:18:59 UTC
Fix released in Zanata 2.0.