Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: snLite 1.6 - more weight & less functionality?  (Read 3550 times)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
snLite 1.6 - more weight & less functionality?
« on: May 04, 2009, 03:33:24 PM »

Let me start by noting that this thread is not meant to be criticism of the snLite project (an sNews fork?) offered by Equilni (Jason Parks) via the link in his signature line.

I had developed a simpler. lighter, pages-only version of sNews 1.6 for a client's site last summer. Intrigued by EQ's claim that snLite is "a lighter version" of sNews, I decided to download his 0.16 zip package today to see what makes it "lighter" than the default sNews 1.6 package.

As it turned out, I was surprised to find out that it is not lighter at all. It is quite bloated has many more files than the default, full-featured version of 1.6. in fact, almost twice the size with 70 files totalling at 212KB (unzipped) compared to sNews 1.6 Default with 11 files totalling 142KB (unzipped, with extra files included). The database uses 5 tables vs the default 1.6 table-set of four. (edited by keys to be more objective and less alarming)

EQ must have some good reason for naming a fatter, bloated larger version of sNews as snLite... though I can't see why. I was expecting a simpler, smaller version of sNews 1.6. Since it wasn't that at all, I decided to not look further and stick with my pages-only version of 1.6 for simple site projects.

Has anyone else installed and tested EQ's snLite project yet?
If so, please share your experience with it.
« Last Edit: May 05, 2009, 08:41:04 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

centered

  • Guest
Re: snLite 1.6 - more weight & less functionality?
« Reply #1 on: May 04, 2009, 06:44:45 PM »

I like criticism actually, let me know your findings - if I am wrong I can improve on them (I've known to be wrong on some occasions).  To get a better look at who used it and their findings look in the thread here: http://snewscms.com/forum/index.php?topic=7720.0

I am actually surprised, and slightly disappointed, that you did not look further into snLite than just the file size.

Now, about the overall file sizes -

Firstly, snLite versions do not correspond with the sNews version. I believe the latest version in Subversion (svn) is 0.206

You can view and download these updated files here: http://code.google.com/p/snlite/source/browse/#svn/trunk

Secondly, the extra file size was due to the svn files being in the download.  If you download .17 zip you don't get that, and the total size is 111K if I remember correctly. I didn't relook at the thread, but I believe someone had an issued getting .16 via svn, so I put up the zip file for them.  My preference so far is svn until I have something more substantial - which will be coming soon, as I will continue to work on snLite in the near future.

Quote
Has anyone else installed and tested EQ's snLite project yet?
If so, please share your experience with it.
A few sites using snLite found on the thread I noted earlier:
http://jlhaslip.trap17.com/snLite/
http://www.mondragonhouse.eu/
« Last Edit: May 05, 2009, 12:35:53 AM by equilni »
Logged

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: snLite 1.6 - more weight & less functionality?
« Reply #2 on: May 04, 2009, 09:00:27 PM »

Yes, posted up a copy of the snLite as a test site, and worked it a little.
Haven't found a 'niche' for it yet, but might have something in the very near future for using it in a site.
Logged
Yes! I have no siggy.

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: snLite 1.6 - more weight & less functionality?
« Reply #3 on: May 05, 2009, 12:41:13 AM »

I grabbed a copy of the latest one this afternoon.
Hope to try it out tonight. Working on the Template for it now.
Logged
Yes! I have no siggy.

Joost

  • Guest
Re: snLite 1.6 - more weight & less functionality?
« Reply #4 on: May 05, 2009, 05:48:55 AM »

@Keyrocks

Let me get this straight: because snlite is larger in (overall) file size and uses more tables, it can be determined as fatter, bloated?

Two questions come to mind:
- Do you think this is a valid and honest method to classify a system or script?
- Where did you find this method?

I am looking forward to your answers.

Meanwhile, my definition of "light":

"light" means a system containing the essential features only, and running efficient.
What essential functions are, I won't discuss, as it is merely a design decision.

How to test:

When talking about efficiency, I look at two parameters.
1) - The time the script recides in memory (script execution time).
2) - The amount of memory being used.

These parameters tells us something about efficiency. If the application is considered light, that means it is fast and doesn't use much resources. A light apllication will most likely run on cheap hosting where resources are limited.

The main bottleneck (besides sloppy coding) are queries. So counting queries is something I always do (parameter 3).
I complete my tests using Apache Bench (AB), which comes with Apache.
Depending on previous test results, I  stress the script by launching up to 100 000 page requests using 10 concurrent connections.
These 4 quick tests take approximately 30 minutes.


My findings.

It has been a while since I tested sNlite, so anything said here might be outdated and slightly inaccurate.
Less than 10 queries are needed to generate page and css.
The bottleneck however, is the script being called 3 times:
Ones when generating the page (xhtml)
Twice when generating two stylesheets.
This leads to calling the script to memory 3 times.
This leads to executing function mysql_connect (a slow process) 3 times.
To ease the pain, I'd suggest to call the css files from a separate file (css.php), which only includes the necessary script. 
Better, would be to write the styling directly to the page ( <style type="text/css"> body {font: blah } </style> ), reducing the mysql_connect and script calls to 1.

About the following:

Code: (core.php) [Select]
// Require the necessary libraries
require('lib.php');
require('admin.php');
require('processing.php');

Consider including the files dynamically. Not all files are needed on all requests, so you could do something like this (pseudo code).

require('lib.php');
if (logged in && we do admin things) require('admin.php');
if( we need to process ($_POST might be the trigger?) ) require('processing.php');

This is a simple way to reduce execution time and memory usage.

My overall conclusion is as followed: Despite the bottlenecks as described above, sNlite is much "lighter" than sNews 1.6. No doubt.
Wheter sNlite is "lighter" than "pages-only version of 1.6 for simple site projects" depends on its modifications: If no "booster functions" are applied, sNlite is probably "lighter".

I have no problems with criticism. I do however, have problems with unfounded criticism. Even if you call it 'a personal opinion' or whatever, it still has to be based on something, doesn't it?
30 minutes of testing and 15 minutes of analysing the results, is all that's needed to have a solid basis to form an opinion. Not much to ask.

Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: snLite 1.6 - more weight & less functionality?
« Reply #5 on: May 05, 2009, 08:36:31 PM »

@ EQ... As I noted at the start of my first post, It was not meant to be "criticism". You need not defend anything, I am not suggesting snLite isn't a good project. It's just fine for those who wish to check it out or use it. And, no, I don't need to install it to decide whether I want to explore it further or not (now); I can do that by scanning the code in the files. I'll keep it handy to install sometime later on when I have time to play with it more.

@ Joost... "Lite" to me also means smaller, fewer, shorter functions, with the least number of files.
I was looking for a 4-file package with a smaller, single engine file. I already have that with my stripped, pages-only 1.6 project with all 4 files totalling just under 140 KB. Again, no need to be defensive.  ;)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Joost

  • Guest
Re: snLite 1.6 - more weight & less functionality?
« Reply #6 on: May 06, 2009, 03:10:47 AM »

@Keyrocks

I am not being defensive at all. If someone is, that would be you.
The point is, you've raised a question, which implies an answers at the same time. An answer based on odd reasoning.
These type of questions are hard to address. So instead of answering that question, I simply try to make you see, that counting bits is pointless, insignificant. Just as comparing the number of pages of books is insignificant. Of course, comparing a 100kb system to a really large system is probably significant.
So instead of looking quantity, it is better to look for quality. Quality code could be described as maintainable, efficient and readable (better said: understandable) code. Making it easier to modify and extend.
Logged