Gondwana
12-26-2003, 11:11 AM
Hi
I had to convert a dynamic site using mostly php & mysql into a static site to put onto a cd. The job is almost done but... for some obvious reasons, I had chosen to keep the product catalog that allows ordering quantities of each article as one big file (now about 800 KB). Was it the wrong choice or not that is my big question. The major problem is that it eats up so much ram that some java function don't work properly anymore or are really too slow to be executed. Where can I clean to speed up?
- the file includes a small 9 KB .js file
- the structure has 3 levels : group - item & part
- for each group there is a series of items (the items visibility is toggled by clicking on each group name - expand/collapse div below each group)
- for each item there is a table where each row is a part description that includes an editable field for quantity, a read only field for price and a hidden field for discount (according to the client access code)
- on load/unload there is a cookie script that read or save the values of the fields not empty
- another script calculates the items selected with their net price and populate another form with only 2 fields for future processing (email/print)
- a short version of the file (only with 3 groups) is visible at http://www.gondwanastudio.com/Pelican/AlphaCD/AllProductsEN.html
- the full version contains 30 groups are works too slow on Mac but don't work fine on PC (processing shows an empty order field)
I would appreciate some fundamental advice on what must or can be improved. Meanwhile I am going to reduce the html code as much as possiblble in the php script that creates the files.
I had to convert a dynamic site using mostly php & mysql into a static site to put onto a cd. The job is almost done but... for some obvious reasons, I had chosen to keep the product catalog that allows ordering quantities of each article as one big file (now about 800 KB). Was it the wrong choice or not that is my big question. The major problem is that it eats up so much ram that some java function don't work properly anymore or are really too slow to be executed. Where can I clean to speed up?
- the file includes a small 9 KB .js file
- the structure has 3 levels : group - item & part
- for each group there is a series of items (the items visibility is toggled by clicking on each group name - expand/collapse div below each group)
- for each item there is a table where each row is a part description that includes an editable field for quantity, a read only field for price and a hidden field for discount (according to the client access code)
- on load/unload there is a cookie script that read or save the values of the fields not empty
- another script calculates the items selected with their net price and populate another form with only 2 fields for future processing (email/print)
- a short version of the file (only with 3 groups) is visible at http://www.gondwanastudio.com/Pelican/AlphaCD/AllProductsEN.html
- the full version contains 30 groups are works too slow on Mac but don't work fine on PC (processing shows an empty order field)
I would appreciate some fundamental advice on what must or can be improved. Meanwhile I am going to reduce the html code as much as possiblble in the php script that creates the files.