Req #44761 [Opn->Bgs]: DOM & Large Files
| From: | rrichards@php.net | Date: | Sat, 15 Oct 2011 12:03:49 +0000 |
| Subject: | Req #44761 [Opn->Bgs]: DOM & Large Files | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-164332@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=44761&edit=1
ID: 44761
Updated by: rrichards@php.net
Reported by: xwisdom at yahoo dot com
Summary: DOM & Large Files
-Status: Open
+Status: Bogus
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: Windows XP
PHP Version: 5.2.5
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2011-10-14 15:27:16] clicky at erebot dot net
The DOM extension is meant explicitely to handle small XML files as it requires a copy of the file
being processed and a large number of objects be kept in memory (this is also true for the SimpleXML
extension which is based on the same underlying parsing library).
If you need a faster alternative, I'd suggest you take a look at the XMLReader and XML Parser
extensions (http://php.net/manual/en/book.xmlreader.php and http://php.net/manual/en/book.xml.php,
respectively).
XMLReader works by using a cursor-based parsing approach, while XML Parser uses a push-based
approach.
Here are some drawbacks though when using these extensions:
- validation may not be possible (true XML Parser)
- you can't use XPath to browse through the data (true for both extensions)
Hope this helps.
------------------------------------------------------------------------
[2008-04-17 14:34:45] xwisdom at yahoo dot com
Description:
------------
I think the (X)HTML DOM features are great but I would like for it to process the DOMDocument much
faster.
It appears that the HTML DOM features in php are not able to handle large html files (200k+).
It's slow down when processing these files.
I would like to request that the DOM processing objects be given a speed boost. The DOM that's
present in the browsers are much faster at processing the element. If this can be done then it would
be great!
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=44761&edit=1