Konsort v1.6 Beta 2 Development Log

HTML Layout Functionality
Created a new routine in the App class to allow the feature to create multiple HTML layouts. In the past the system only supported 1 layout with different CSS themes.
Our goal with 1.6 is to have it where users can still select different themes for their website but with the extra added feature to select what sort of layout they would like.
Our idea now is to still have it where they select
a theme but each theme will be connected to a specific layout which in return can add a sense of flexibility to the system.

SQL Caching and Benchmarks
Rebuilding of the SQL queries has gone really well over the last few days. We will take section by section and first start with areas where we feel has a lot of traffic and excess queries.
Our first goal is to drop the total number of queries per page. With 1.6 Beta 2 we have added a new caching class that will class a few queries that do not need to be live on each page.
So far we ran tests on the main index page when a user is not logged in and we got the following results when comparing with older versions.

Below we display how many queries on average was used to execute the page:
V1.6 Beta 2     = 7
v1.6 Beta 1        = 29
v1.5.1        = 67

Below we display how long it took to execute all the queries:
V1.6 Beta 2     = 0.0038469
v1.6 Beta 1        = 0.0291002
v1.5.1        = 0.0378141

Thus far it has been a significant improvement and our next focus will be the “My Account” and user profile section.

Memory
Another part of the software we have been working on is lowering the memory limit. Both v1.6 Beta 1 and v1.5.1 had a 5.4 Mb average.
After lowering the queries and removing the usage of the Menu class which creates the main menu, v1.6 Beta 2 has an average of 3.23 Mb.
Target is to bring it under 3 and run around 2.3-2.5 tops.

Average Load
Over the next few weeks while we are fixing issues we come across we will also streamline each section to make sure we drop the overall load of each page.
Below we added the loading times of each version we have tested so far.

V1.6 Beta 2     = 0.2938
v1.6 Beta 1        = 0.7195
v1.5.1        = 0.5669

Our goal is to bring it down to 0.1. We now average around 0.3 seconds and in some cases it drops under 0.2.
To our surprise we found that the SMARTY template engine is taking a good chunk of the load. On average to load cached templates it takes 0.2245.
Which gives us a load time for the core software at 0.0693. Which is something we would like as the average time for the entire script including the template system.
We have a few options now and we are still looking into what is the most viable option.
Our first option and it is something we started to look into yesterday was to go with using Template Lite (formally known as Smarty Lite).
It took some major modifications in the code for it to work with Konsort at 90%. 10% is still not functional, but we will still look into this option.
Another option and I believe the best bet is to modify the template system to fit our needs. The last viable option is to use a template system we created not to long ago.
This however would take a lot longer since all the HTML files will have to be re modified.
Plus SMARTY is a very popular template system and the language they created is widely used so this is why we used it to begin with.

Our main focus for today will be to drop the SQL remodeling and focus on the issue with the template system and come up with a plan that will improve the load for each page to our and your satisfaction.

Removal of some Requirements
Slight modifications have been made to the SMARTY template system where it will now not store cached templates in multiple folders.
It will all be housed in 1 template cache folder. The reason for this change was mainly to remove the requirement for running Konsort in “safe_mode”.

Numerous testing was done to confirm that the requirement for “register_globals” and “open_basedir” will not needed anymore as well.
However we will still recommend to run Konsort with “safe_mode” turned OFF and “register_globals” turned OFF as well.
For a detailed guide on why, feel free to check: http://se2.php.net/manual/en/security.registerglobals.php