php-general Digest 6 Mar 2005 04:18:58 -0000 Issue 3321

Topics (messages 210066 through 210078):

Re: Database engine in PHP
        210066 by: Gerben

How can i calculate total process time?
        210067 by: JoShQuNe \(TR\)
        210068 by: M. Sokolewicz

stream_set_timeout & get_headers (PHP5)
        210069 by: Chris

Comments and performance
        210070 by: Chris Smith
        210072 by: Matthew Fonda

cache engine
        210071 by: Evert - Rooftop Solutions
        210073 by: Chris Smith
        210074 by: Evert - Rooftop Solutions
        210075 by: Mark Charette
        210076 by: James Williams
        210077 by: Evert - Rooftop Solutions
        210078 by: Mark Charette

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Thanks Manuel. That's excactly what I was looking for. This will save me a 
lot of time.
Thanks a lot.

greeting Gerben

"Manuel Lemos" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hello,
>
>
> on 03/04/2005 03:45 PM Gerben said the following:
>> I was wondering if there is any DBMS, like MySQL, which is (fully) 
>> implemented
>> in php. That is a database engine written in PHP.
>> I know this is not the most effecient way, but I'm not planning to use it
>> for heavy weight database-driven-application.
>
> Yes, you may want to take a look at this flat file database manager class 
> that even supports SQL, which seems to be exactly what you are looking 
> for:
>
> http://www.phpclasses.org/pdb
>
>
> -- 
>
> Regards,
> Manuel Lemos
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
> PHP Reviews - Reviews of PHP books and other products
> http://www.phpclasses.org/reviews/
>
> Metastorage - Data object relational mapping layer generator
> http://www.meta-language.net/metastorage.html 

--- End Message ---
--- Begin Message ---
Hi, i wanna ask if anybody knows how to calculate the total process time. I 
guess there exists a
function to perform but i dont know which one it is. I mean if u c any PHP Nuke 
site, it says this
page is produced in .... seconds. I made some codes it calculates but i dont 
believe that it is
equal to total process time.. Thanx..

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--- End Message ---
--- Begin Message --- JoShQuNe wrote:
Hi, i wanna ask if anybody knows how to calculate the total process time. I 
guess there exists a
function to perform but i dont know which one it is. I mean if u c any PHP Nuke 
site, it says this
page is produced in .... seconds. I made some codes it calculates but i dont 
believe that it is
equal to total process time.. Thanx..

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
fetch the microtime() at the top of the script, and at the bottom of the script you fetch it again. Subtract the first from the later, and you're left with the time it took. Then change it to a human-readable form, and you're done. You can't get closer without hacking the ZE
--- End Message ---
--- Begin Message --- I'm requesting some remote files to cache on my own server and performing a get_headers() first to find out the file type, since I don't always know what it is. I've discovered some timeout problems with the remote server sometimes and my own script would end up with a fatal error because the script took longer to process than 30 seconds. Being able to set a timeout would allow me to gracefully recover, rather than displaying an ugly error.

I know I can use stream_set_timeout() on fsockopen() if I want to write my own get_headers function for < PHP5... but is it possible to set the timeout on PHP5's built in get_headers()?

--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

--- End Message ---
--- Begin Message ---
Hi,

Probably a silly question, but when I am writing php scripts (specifically large classes), I tend to write just as many comments as lines of code (for my own reference).

Does this affect _execution performance_ of the scripts at all i.e. are they precompiled/interpreted and cached without comments or interpreted on every execution?

I am using PHP 5.0.3 on Apache on Windows.

Many Thanks,

Chris Smith
Ninja Labs
http://www.ninjalabs.co.uk/

--- End Message ---
--- Begin Message ---
Hello,

Comments should not affect speed or performance at. Commenting is a good
thing, and you should continue to do it. :)

On Sat, 2005-03-05 at 13:15, Chris Smith wrote:
> Hi,
> 
> Probably a silly question, but when I am writing php scripts 
> (specifically large classes), I tend to write just as many comments as 
> lines of code (for my own reference).
> 
> Does this affect _execution performance_ of the scripts at all i.e. are 
> they precompiled/interpreted and cached without comments or interpreted 
> on every execution?
> 
> I am using PHP 5.0.3 on Apache on Windows.
> 
> Many Thanks,
> 
> Chris Smith
> Ninja Labs
> http://www.ninjalabs.co.uk/
-- 
Regards,
Matthew Fonda
http://mfonda.info

--- End Message ---
--- Begin Message ---
Hi people,

I have written an extensive web application frameworks, and I keep seeing my execution time and memory-usage growing. Right now it is not a problem, but before it get's out of hands I will need to create a good cache engine.
My cache engine requires that I can cache method results, based on multiple parameters. What would be a good way to implement this? I know this propably a well-formed question, but before I start, I want to be sure I'll do it the right way. Has anyone got any experience with this, or can anyone give me some pointers on where to start looking?


thanks in forward,
Evert

--
Rooftop Solutions - Web Applications on Demand
tel. (+31)628962319 fax. (+31)842242474
http://www.rooftopsolutions.nl

--- End Message ---
--- Begin Message ---

Evert - Rooftop Solutions wrote:

I have written an extensive web application frameworks, and I keep seeing my execution time and memory-usage growing. Right now it is not a problem, but before it get's out of hands I will need to create a good cache engine.
My cache engine requires that I can cache method results, based on multiple parameters. What would be a good way to implement this? I know this propably a well-formed question, but before I start, I want to be sure I'll do it the right way. Has anyone got any experience with this, or can anyone give me some pointers on where to start looking?

I have seen some people using stornig cached items in shared memory. This is explained in some detail here:


http://www.danga.com/memcached/

There are PHP client APIs available.

Alternatively PEAR offers some interesting caching solutions although i have not investigated them thoroughly ( http://pear.php.net/ )

Caching brings all sorts of wierdness out in applications due to multiple states of data being present in different layers in a system, so be careful.

Hope this helps,

Chris Smith
Ninja Labs
http://www.ninjalabs.co.uk/

--- End Message ---
--- Begin Message ---
Chris Smith wrote:

I have seen some people using stornig cached items in shared memory. This is explained in some detail here:

http://www.danga.com/memcached/

I heard that shared memory is actually slower than writing and reading a file and it is not available on windows systems.

There are PHP client APIs available.

Alternatively PEAR offers some interesting caching solutions although i have not investigated them thoroughly ( http://pear.php.net/ )

Caching brings all sorts of wierdness out in applications due to multiple states of data being present in different layers in a system, so be careful.

Thanks I will check it out.

Hope this helps,

Chris Smith
Ninja Labs
http://www.ninjalabs.co.uk/

greetings, Evert

--
Rooftop Solutions - Web Applications on Demand
tel. (+31)628962319 fax. (+31)842242474
[EMAIL PROTECTED]
http://www.rooftopsolutions.nl

--- End Message ---
--- Begin Message --- Evert - Rooftop Solutions wrote:
I heard that shared memory is actually slower than writing and reading a file and it is not available on windows systems.

Hmmm ... that's an interesting thing you heard concerning shared memory. Care to share _who_ told you that?


I'd like to make sure I don't hire him/her in the future.

Mark C.
--- End Message ---
--- Begin Message --- Mark Charette wrote:
Evert - Rooftop Solutions wrote:

I heard that shared memory is actually slower than writing and reading a file and it is not available on windows systems.


Hmmm ... that's an interesting thing you heard concerning shared memory. Care to share _who_ told you that?

I'd like to make sure I don't hire him/her in the future.

Mark C.

HaHa Burn! so you're saying that this is *not* true. I'm also interested in cacheing although I know nothing about it. I'm making a forum and it's small size and fast processing times are it's forte, so a cache system would be awesome, I'm thinking about incorporating it with my simple templating class.
--- End Message ---
--- Begin Message ---
Mark Charette wrote:

Evert - Rooftop Solutions wrote:

I heard that shared memory is actually slower than writing and reading a file and it is not available on windows systems.


Hmmm ... that's an interesting thing you heard concerning shared memory. Care to share _who_ told you that?

I'd like to make sure I don't hire him/her in the future.

http://www.onlamp.com/pub/a/php/2001/10/11/pearcache.html

Check it out, is in old article, but it says "|shm| -- The |shm| container stores the cached data in the shared memory. Benchmarks indicate that the current implementation of this container is much slower than the |file| container."

It is a bit outdated, but I haven't seen any recent benchmarks.

grt,
Evert

--
Rooftop Solutions - Web Applications on Demand
tel. (+31)628962319 fax. (+31)842242474
[EMAIL PROTECTED]
http://www.rooftopsolutions.nl

--- End Message ---
--- Begin Message --- Evert - Rooftop Solutions wrote:

Check it out, is in old article, but it says "|shm| -- The |shm| container stores the cached data in the shared memory. Benchmarks indicate that the current implementation of this container is much slower than the |file| container."

Which, of course, is miles away from saying that shared memory is slower than the file system.


Mark C.
--- End Message ---

Reply via email to