Ticket #105 (new enhancement)
[PATCH] dynamically allocate memory when BUFSIZE is hit
| Reported by: | lwu | Owned by: | why |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | lib/hpricot | Version: | |
| Keywords: | Cc: | oksteev |
Description (last modified by oksteev) (diff)
From steve d on the mailing list:
you can find patched gem here: http://coderrr.wordpress.com/2007/09/14/hpricot-patch-to-support-arbitrarily-large-elements/
I got tired of running into stupid unpredictably sized .NET viewstates and I've thought for a while the parser should handle arbitrarily sized elements. So I finally made a patch. plz apply ;]
There's no difference in performance for html which has no elements greater than the starting buffer size.
Running Hpricot.parse(TestFiles::BASIC) 10000 times:
original code: user system total real 19.730000 0.810000 20.540000 ( 45.645450) w patch: user system total real 19.920000 0.790000 20.710000 ( 46.001500)
Change History
Note: See
TracTickets for help on using
tickets.
