[null, {"document_url": "https://www.zkoss.org/wiki/Small_Talks/2015/September/Faster_And_Lighter,_The_Performance_Test_On_ZK8", "unformatted_src": "/_w/images/0/0d/ZK8_performance_test_memory_consumption.png", "src": "https://www.zkoss.org/_w/images/0/0d/ZK8_performance_test_memory_consumption.png", "formatted_filename": "ZK performance test memory consumption", "alt_text": "ZK8 performance test memory consumption.png", "rendered_width": 541, "rendered_height": 451}, null, {"document_url": "https://www.zkoss.org/wiki/Small_Talks/2015/September/Faster_And_Lighter,_The_Performance_Test_On_ZK8", "unformatted_src": "/_w/images/7/75/ZK8_performance_test_response_time.png", "src": "https://www.zkoss.org/_w/images/7/75/ZK8_performance_test_response_time.png", "formatted_filename": "ZK performance test response time", "alt_text": "ZK8 performance test response time.png", "rendered_width": 566, "rendered_height": 449}, null, null]



Documentation>Small Talks>2015>September>Faster And Lighter, The Performance Test On ZK8
Faster And Lighter, The Performance Test On ZK8


For the upcoming ZK 8, we have done a lot of performance tuning on both server side and client side. To determine the difference in performance between ZK 7 and ZK 8, we have arranged a test, using MVVM and children binding to generate 30 * 30 <div>s and <label>s. Moreover, we used the new feature - Shadow element in ZK 8 to generate the same components. As for the testing tools, we used JMeter to record the average response time, and VisualVM to record the memory consumption of each test case.

Test Environment

Listed in the following are the test's hardware spec, required software, and corresponding parameters.

Test Plan

There are two test cases in this performance test. First, we used children binding and MVVM to generate 30 * 30 <div>s and <label>s, and switch three versions: ZK 7.0.6 EE, ZK 8.0.0 CE, and ZK 8.0.0 EE. Second, we used the Shadow element to generate the same amount of components. Testing is done by simulating the situation of 100 to 1500 concurrent users accessing the page.

Test Case

The whole performance testing project for this article can be found on github.




Test Result

Memory Consumption Response Time ZK 8 has both memory and response improvements; it is faster and lighter than ZK 7. If using ZK 8's new feature - Shadow Elements- the memory consumption is approximately one-third lighter than ZK 7 for 100 to 1500 concurrent users. In regard to the response time, ZK 8 is approximately 6 to 12 times faster than the old version. We hope you will like the speed enhancement of ZK 8!

Performance enhancement list

Enhancement in ALL editions

1. More efficient rendering on children binding.

2. Use a direct method invoking instead of java reflection for component to apply properties.

3. Use a lazy initialization of Java Object creation to reduce the memory footprint.

4. Use StringBuilder instead of StringBuffer for component rendering.

5. Use new string escape implementation.

6. Use java.util.concurrent framework instead of synchronised keyword.

MVVM enhancement in EE edition

1. Use a merge algorithm to reduce the MVVM tracking nodes.

2. Speed up Bind EL expression resolving.

Shadow Element enhancement

1. More lightweight and more efficient to support a collection data binding.

2. Auto-release the memory once it doesn't contain dynamical data attributes.


Retrieved from "https://www.zkoss.org/wiki/Small_Talks/2015/September/Faster_And_Lighter,_The_Performance_Test_On_ZK8"
Category: Small Talk This page was last modified on 6 October 2015, at 01:26.
This page has been accessed 10,875 times.