yangruiyou85 / yiidoc

Automatically exported from code.google.com/p/yiidoc
0 stars 0 forks source link

Difference in views/sk/log.php from other languages? #107

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Why is there a difference between these two files, where the sk version 
displays memory usage (and if displaying memory usage, wouldn't it be more 
dependable to use CLogger::getMemoryUsage() )?

http://code.google.com/p/yii/source/browse/trunk/framework/views/log.php
http://code.google.com/p/yii/source/browse/trunk/framework/views/sk/log.php

(Referencing code using Yii project source browser, but verified it still 
exists in yiidoc source for sk)

Original issue reported on code.google.com by intel352 on 22 Jun 2011 at 9:09

GoogleCodeExporter commented 9 years ago

Original comment by alexander.makarow on 11 Aug 2011 at 9:07

GoogleCodeExporter commented 9 years ago
Following memory usage and RPS (requests per second) is one of the most 
important performance indicators during development. Benchmarking each request 
and following memory comsumption gave me good information when I was comparing 
e.g. Zend against Yii or other frameworks.

I have added it into first draft of SK translations coz I believe it may be 
useful also for other developers and did not want to bother DEV team with this 
small thing. At that time I did not know about CLogger::getMemoryUsage(). 

Now what can we do - I would really love to keep it there and I think it is not 
causing any problems to anyone. However you decide:

A - Should I completely remove it?
B - Or can I leave it there and replace with CLogger::getMemoryUsage() ?

Lubos

Original comment by lubosdz on 12 Aug 2011 at 11:07

GoogleCodeExporter commented 9 years ago
I vote to replace with the CLogger::getMemoryUsage() method, and consistently 
apply the change across all of the templates, as that's something that no-one 
would complain about having in Yii's default output, imho...

Original comment by intel352 on 12 Aug 2011 at 1:30

GoogleCodeExporter commented 9 years ago
Hi, I am not sure about final result here.... 
So what should I do? 
Replace with CLogger::getMemoryUsage() and add it to all language templates...? 
Thanx.
Lubos

Original comment by lubosdz on 18 Aug 2011 at 10:57

GoogleCodeExporter commented 9 years ago
Method CLogger::getMemoryUsage() is not static.

Therefore in strict mode I am getting:

Non-static method CLogger::getMemoryUsage() should not be called statically, 
assuming $this from incompatible context    E_STRICT.

Original comment by lubosdz on 22 Aug 2011 at 9:10