Re: Flexible __autoload scheme
From: Berislav Lopac (berislav.lopac_at_dimedia.hr)
Date: 09/10/04
- Previous message: Jim: "shared memory confusion"
- In reply to: Zurab Davitiani: "Re: Flexible __autoload scheme"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 10 Sep 2004 08:34:24 +0200
Zurab Davitiani wrote:
> Berislav Lopac wrote:
>
>> A tangential question: does anyone has an idea which would have a
>> better performance -- iterating through an array as you suggest
>> above, or finding in an XML file using XPath and SimpleXML, assuming
>> the same number of nodes?
>
> What would be the purpose of an XML file if all you want is a
> one-dimensional classpath array that's created on the fly? What other
> properties/attributes would you track? Almost certainly, an XML file
> would need more memory and create more overhead.
Because array must be iterated through, while a DOM document can be searched
via XPath by a simple /*/classname (or something; I must refresh my Xpath
skills). Of course that XML needs more memory, but I'd like to know
generally which is faster, iterating arrays or DOM document creation + Xpath
search. Intuitively I'd also go for the first, but I'm asking if someone has
any first-hand experience.
Berislav
-- If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are Groucho, Chico, and Harpo, then Usenet is Zeppo.
- Previous message: Jim: "shared memory confusion"
- In reply to: Zurab Davitiani: "Re: Flexible __autoload scheme"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|