Ryan,
Yes, I turn on the profiler and start clicking on a different page to collect the number.
Yes, I would tend to agree with your conclusion on how to read the number.
I hope it will be hefpful on tuning Modx.
As I was looking through the code I also found many instance of "var" will is "deprecated" in future version of PHP. It suggests to use "private/public/protect" rather than "var"
I also notice there are LOT of call to "trim". Is there a way to reduce number of call to "trim"?
There’s definitely the need to do a little work on tuning and optimizing MODx as best as possible. There’s likely to be areas in the functions themselves where we can streamline the processes and cut down on parsing time.
In regards to the deprecated "var" instances...I agree. Especially from an object-oriented point of view, it’s probably best to label all variable calls as either private, public or protected depending on its use within a given function or class.
The most logical way to cut down on the use of "trim" is to use it only when saving a string to the database. There really should be no reason to have to use a trim on data that already exists. The more proper use of trim is for data integrity before a string is even saved to the database. We might have to look at little things like this too while optimizing MODx.
Jeff Whitfield
"I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
If we want to make MODx feel really responsive I think we should strip out the core stats and use a stats module (is Mark’s ready to go?) that is turned off by default. If I’m reading the profile correctly then the log is taking an enormous amount of time. I know from experience that the logging can cripple a busy site.
I know we’ve talked about this in the past but maybe it’s worth doing for 3.3. I doubt that it will take too much work.
-
MODX Staff
- 12,272 Posts
Mark’s is close to ready, but should be as soon as the other Marc (of the stats making fame) does a release "any moment now"
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
☆ A M B ☆
- 24,524 Posts
I would like to see this also; I would like a basic counter module, to start with. Most people only want that kind of "tracking", and with what we have now it’s "all or nothing". I’ve been thinking of making a simple snippet to just keep a count in a text file. I wonder which is faster, open a text file, read the integer, add one to it, write it back, or use a database "update blah set x = x+1"?
I integrated Slimstat into my Mambo sites and after a few month it kill my server! My site was so sluggish that is not usable so I have remove it from my sites.
I have used several stat collection over the year and I must say none of them are as good as the cpanel awstats or any of the different flavor. It has no impact to the site performance!
I am in agreement with Susan that there should be some really simply stats to be collected like the hit counts and that should all is need in my opinion.