Buzzinoffbond / phpliteadmin

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

double vs single quotes in PHP #200

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is really an small suggestion that can be really ignored..

PLA makes use of double quotes where will be best use single quotes.
Remember that double quotes in PHP "expands" string while single quotes not. 
There are many code in PLA with double quoted strings where it really do not 
need expansion so single quote is a little (very little) more efficient because 
PHP skips the expansion process.

Original issue reported on code.google.com by is2cool...@gmail.com on 21 Mar 2013 at 11:11

GoogleCodeExporter commented 9 years ago
Yeah, well. Not worth the effort, but yes.
In my opinion, removing a line of HTML output would be bigger optimization than 
this.
If a millisecond that could be saved by this counts, then you shouldn't use 
php, but another language.

Original comment by crazy4ch...@gmail.com on 21 Mar 2013 at 1:21

GoogleCodeExporter commented 9 years ago
We briefly touched on this in issue #181 (comments #29-#33*) but although 
probably more efficient, the number of strings required to make a noticeable 
difference is orders of magnitude larger than what we have (and we have many!).

So we'll concentrate on reducing the number even more, rather than making each 
one of them a microsecond faster :)

I'll mark this as Won't-Fix, although we are aware of the micro-optimization 
option.

[*]http://code.google.com/p/phpliteadmin/issues/detail?id=181#c29

Original comment by dreadnaut on 21 Mar 2013 at 1:27

GoogleCodeExporter commented 9 years ago
Yes all this is true, is small compared with other questions, is simply a 
suggestion (if possible). I'm using PLA to admin remote (sloooowww.... GRPS) 
embedded systems and things needs much more time than on a desktop computer, 
each microsecond counts..

Original comment by is2cool...@gmail.com on 21 Mar 2013 at 3:43

GoogleCodeExporter commented 9 years ago
That's interesting. What is the minimal hardware you run PLA on?

Original comment by crazy4ch...@gmail.com on 21 Mar 2013 at 4:20

GoogleCodeExporter commented 9 years ago
The system has an ARM AT91RM9200 running at 180MHz (about 90 bogomips) with 
64Mb SRAM and 16Mb FLASH. The most big program I'm running is PHP, that has 
2.5Mb, witch is greater even than kernel.

Original comment by is2cool...@gmail.com on 21 Mar 2013 at 4:38

GoogleCodeExporter commented 9 years ago
That's very cool. We should get Issue #78 fixed for people with little memory 
available, 'cause I guess it would make a noticeable difference even with 
smaller sets.

Original comment by dreadnaut on 21 Mar 2013 at 4:42

GoogleCodeExporter commented 9 years ago
Cool. Thanks for the info. That's about as much as the guy running PLA on a 
TP-Link (openWRT) router in issue #112 (you have a slower cpu, but far more 
memory). Do you have similar problems? I mean, the UI being slow is probably 
expected - but problems of records not updated completely?

There will be a time when every fridge comes with PLA just as a maintenance gui 
:-)

Original comment by crazy4ch...@gmail.com on 21 Mar 2013 at 4:48

GoogleCodeExporter commented 9 years ago
>  We should get Issue #78 fixed for people with little memory available,
Agreed.

Original comment by crazy4ch...@gmail.com on 21 Mar 2013 at 4:49

GoogleCodeExporter commented 9 years ago
No, at the moment I don't have any problem other than slow UI, from 1 to 2 
seconds on LAN. But when connecting through a GPRS connection.. up to 10 times 
slower, depends on network coverage.
PLA is very nice for maintenance.. I love it.. it make my live more easy..

Original comment by is2cool...@gmail.com on 21 Mar 2013 at 5:10