Changes for page Performance
on 2011/02/25 09:52
on 2011/02/25 09:55
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,3 +1,6 @@ 1 += General performance and usability guidelines = 2 + 3 + 1 1 The Requea Platform is designed to offer light speed performance. The goal is to have a sleek and very interactive interface. 2 2 3 3 Remember that ergonomics research states that: ... ... @@ -10,15 +10,14 @@ 10 10 11 11 12 12 13 - 14 14 In addition to that, I believe that application scalability is achieved by being server-side efficient. When you spend less CPU cycles on a user action, the total amount of CPU time can be spread over a larger number of users. 15 15 16 16 17 -In essence, this is a time race and every millisecond counts. To achieve that performance, there are a number of mechanisms built in the platform to serve the data to the user within the 100 ms time range. 18 18 20 += Elements of performance = 19 19 22 +In essence, this is a time race and every millisecond counts. To achieve that performance, there are a number of mechanisms built in the platform to serve the data to the user within the 100 ms time range. 20 20 21 - 22 22 For information, a non comprehensive list of them: 23 23 24 24 - Use of taglibs and JSP. For rendering, the platform uses servlets and JavaServerPages. Those are java compiled objects that are optimized for rendering. In addition, the Java JIT (Just in time compile) does a great job of pre-compiling the java byte code into native processor assembly code for optimum CPU performance. ... ... @@ -44,6 +44,7 @@ 44 44 45 45 46 46 49 += Possible bottlenecks = 47 47 48 48 49 49 ... ... @@ -53,12 +53,12 @@ 53 53 Here is a list of a few of the one we have found. Those are real examples of real problems that we found on production systems. 54 54 55 55 56 - 0-enough memory.59 +* enough memory. 57 57 Symptoms: Slow down, Java out of memory exceptions in the log files. 58 58 Solution: This is basic Requea installation configuration. You should adjust the memory requirements to the load of your application. And make sure your database server has enough memory also. 59 59 60 60 61 - 0.1-First actions slow64 +* First actions slow 62 62 Symptoms: The first user action is slow, especially after a platform upgrade. Subsequent calls are fast. 63 63 Solution: None. Loading and caching takes time, same with JSP compilation and search indexes first creation. If you restart your app, you reboot you server every night, you will just defeat all the caching mechanisms in place. And not only the Requea platform caches, but also the database server caches. If you have to reboot your server, just accept this first action slowness. If you do not have to reboot your server, just don't. We have platforms with uptime over 100 days running just fine. And most of the restarts are due to operating system security updates, not the platform itself. 64 64 ... ... @@ -67,9 +67,8 @@ 67 67 Symptoms: If you do complex querying on large tables, the database server make experience delays 68 68 Solution: Make sure that you have the right indices on your database. You can turn on SQL trace by creating an hibernate.properties file in your WEB-INF/classes path and setting the hibernate.show_sql to true. This kind of problem starts on tables with over 100k records. If that's not the case, don't bother with this one. 69 69 73 +* References or Components with one to many cardinality and very large collections. We have found a case where an entity had a property reference to another entity with a one to many occurrence. The target entity was a large volume table (over 2M records) and each parent entity had tens of thousands of linked records. 70 70 71 -2 - References or Components with one to many cardinality and very large collections. We have found a case where an entity had a property reference to another entity with a one to many occurrence. The target entity was a large volume table (over 2M records) and each parent entity had tens of thousands of linked records. 72 - 73 73 Symptoms: Slow processing of data. Slow JDBC warnings in the logs even tough the retrieval is done on an indexed foreign key. 74 74 75 75 Solution: Do not declare this property in the parent object. Handling this kind of collection (Reference or Component) is highly questionable. In many cases the platform will have to load this collection (prior to saving for example) and lazy loading will not help. Use adhoc filtering and custom user actions instead. ... ... @@ -78,7 +78,7 @@ 78 78 79 79 80 80 81 - 3-Calculated options (List of Values) returning very large amount of data.83 +* Calculated options (List of Values) returning very large amount of data. 82 82 83 83 Symptoms: Slow interface, very large HTML generated. Slow rendering metrics on the monitoring 84 84 ... ... @@ -89,9 +89,8 @@ 89 89 90 90 91 91 94 +* Over use of calculated fields. Especially when those calculated fields are based on components or reference 92 92 93 -4 - Over use of calculated fields. Especially when those calculated fields are based on components or reference 94 - 95 95 Symptoms: Too many SQL queries on just a click on a check box. (check number of JDBC operations on the performance monitoring on the #postback sub action) 96 96 97 97 Solution: If you have many calculated fields and many properties with the "Recalcuate All" rule set to true, the server will spend a considerable amount of time recalculating those options. Reduce the number of calculated properties. Scale them down with filtering. Use separate user actions if you need to render the lists. ... ... @@ -99,9 +99,8 @@ 99 99 100 100 101 101 103 +* Slow operations. 102 102 103 -5 - Slow operations. 104 - 105 105 Symptoms: You do a lot of processing (exporting, importing files...) 106 106 107 107 Solution: When you do a lot of processing, a slow operation cannot be avoided. Make sure that the "slow operation" check box is checked, and set progress.total and progress.current values in you script. The platform will render a progress bar and let the user the opportunity to cancel the operation if necessary. ... ... @@ -108,7 +108,7 @@ 108 108 109 109 110 110 111 - 6-Consider upgrade.111 +* Consider upgrade. 112 112 113 113 Symptoms: Old version 2.1. 114 114