[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

Code Preformance Issue

Asked by maclema in Java Programming Language

Tags: java

OK guys, sorry for the long post but there lots here! Thanks in advance!!!

Server Info:
Java 1.5
Macromedia JRUN
MySQL 5

Data Structure

TABLE: "cpList"
All employee competiencies with a parentID column to link competiencies to their parent competencies, this allows for unlimited levels of competiencies.

TABLE: "cpPosition"
All employee positions

TABLE: "cpCompetiencyToPositionMatch"
Matches competiencies to employee positions

TABLE: cpCompetencyToEmployeeMatch
Matches specific competiencies to specific employees as well as contains the date the employee achieved this competiency.

TABLE: cpCompetencyToTopicMatch
Matches competiencies to training topics


Now, there are many different places around the site where I need to display competiencies and there parent folders each, sorted, filtered, and displayed in a different way.

So here is how I am doing it now:

CompNode Class:
  1. Loads all of the current competency's child competencies.
  2. Holds a reference to this competency's parent.
  3. Holds the title of the competency.

Abstract CompNodeFilter Class:
  1. Contains a filter(CompNode cn) method that retruns true or false if the node should be filtered out of the current search.

Abstract CompNodeRenderer Class:
  1. Contains a render(ConpNode cn) that returns the HTML to be displayed for this node.


So what I am doing is loading all the "root" competencies (in other words, those with a parentID of 0) and then the CompNode class handles the recurrsive loading of all the child competencies. Then depending on the page, I apply various Filters(CompNodeFilter) and then apply a specific Renderer(CompNodeRenderer) to display everything that was loaded. For each competency I also check if the current user has completed the competency as well as when they completed it. I also find all the topics assioated with the competency and render a javascript dropdown with links to the topics.

The problem now is that everything is SLOOOOOWWW.. I have about 5000 records in the cpList table and I am usually displaying 500 - 2000 records on each page. After all said and done any page that loads competencies takes about 20 - 45 seconds to load and the project managers are hounding me to make it load faster! When I check the page properties the actuall pages are about 300KB so I figured 15 - 45 seconds was not to bad!!

Does anyone have any suggestions of how I may be able to speed things up or different ways I can go about loading and displaying everything.

Here is some testing I have done that proves our site is pretty fast, but I need to make it faster :(


Using Firefox, with cache disabled

SITE               SIZE(KB)        TIME              B/ms              
Google            17                 1.14s              14.9
Yahoo             40                 4.41s                9.0
Basecamp       21                 4.23s                5.0
Canada.com    59                 5.11s              11.6
Canoe.ca        20                 4.46s                4.5
Rogers.ca       26                 4.72s                5.5

OUR SITE       300                19.63s            15.3   << Look! Faster than EVERYONE!
[+][-]06/07/06 03:48 PM, ID: 16857431Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/07/06 10:54 PM, ID: 16858899Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06/08/06 02:27 AM, ID: 16859728Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/08/06 07:27 AM, ID: 16861641Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Java Programming Language
Tags: java
Sign Up Now!
Solution Provided By: bazarny
Participating Experts: 4
Solution Grade: A
 
 
Loading Advertisement...
20091021-EE-VQP-81