Reply to Re: Performance question - passing data between objects (PHP4-styleOOP)

Your name:

Reply:


Posted by Jerry Stuckle on 11/10/06 13:18

Markus Ernst wrote:
> Jerry Stuckle schrieb:
>
>> Markus Ernst wrote:
>>
>>> Jerry Stuckle schrieb:
>
> [...]
>
>>>> The real question is - are you actually having performance problems,
>>>> or are you spinning your wheels on something which may or may not be
>>>> a problem? I suspect the latter.
>>>
>>>
>>>
>>> Your suspection is correct. After I _had_ performance problems (30+
>>> seconds execution time for displaying 20 or 30 items...) I started
>>> caring for performance issues at all, and now I try to be aware of
>>> them even before problems occur. With my poor technical background (I
>>> don't have a basic IT education) this sometimes makes me spend too
>>> much effort on questions of low priority. Thus, comments of the kind
>>> you posted are very helpful for me, thanks!
>>
>>
>> I understand. I've been programming since the late 60's, and have
>> seen my share of performance problems (think of what it was like to be
>> on a mainframe with 4,000 bytes - not 4K - of core memory, running at
>> something quite a bit less than 1Mhz clock rate).
>>
>> And yes, you should always keep potential performance problems in mind
>> when programming. But I really don't worry about them until I get the
>> first cut at the program running and see if I have performance problems.
>>
>> As an example - I wrote a fairly small C++ program with a lot of
>> recursive calculations (the theoretical max was 81! (81 factorial - 81
>> x 80 x 79 ... x 3 x 2 x 1) operations. The goal was to have it finish
>> the ops in something less than a couple of minutes on a 900Mhz laptop.
>>
>> I went ahead and wrote it, not paying much attention to performance.
>> Results when I was done was every run was < 1 second. Mission
>> accomplished.
>>
>> Another case I had to parse out a rather large (5MB) html file in PHP.
>> The goal was to convert some huge tables to csv files for importing to
>> a spreadsheet. The first run took over 15 minutes. So at that time I
>> went back and optimized the code. Final results were around 20 seconds.
>>
>> The bottom line was - I didn't waste any time on the first one because
>> it was already fast enough. The second one took me around 10% more
>> time to tweak and get the speed down. But that was much easier
>> because I already had the program working, and my design allowed me to
>> easily modify the code to close up the bottlenecks.
>
>
> I actually started learning Java now - not because I am sure I will
> write Java in the future, but because I hope that knowing a less
> permissive, strictly typed, purely object oriented, compiled language
> will help me write better PHP :-)

Yep, Java is a good language, also. And I agree with you - the
techniques it uses can help quite a bit.

I've found it's always good to learn new languages (I stop counting at
15, many of which I no longer remember - and may no longer exist).
Different techniques can also lead you to different (and sometimes
better) approaches to a problem.

And I highly suspect you'll enjoy Java.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация