| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Got curious, and tested each reduction. Final size Component Reduction Red% 44736907 original 42815943 DTD -1920964 -4,29% 39039498 xmlns -3776445 -8,44% 33554966 comments -5484532 -12,26% 30913772 dbwsi -2641194 -5,90% |
Sorry, something went wrong.
| // These first five elements account for almost 50% | ||
| // of all insignificant Docbook whitespace in manual. | ||
|
|
||
| $trimList[] = 'refsect1'; |
There was a problem hiding this comment.
I prefer to use this form given it's a static array. But that's preference.
$trimList = [
// These first five elements account for almost 50%
// of all insignificant Docbook whitespace in manual.
'refsect1',
'varlistentry',
'...',
];
Sorry, something went wrong.
|
I'm delaying the merging of this PR, for now. There are some warnings being silenced on configure.php, and it is easier to check for insignificant differences without a change like this. |
Sorry, something went wrong.
|
Rebased. Trim doctype, comments and duplicated namespaces. Removed trim of inter element whitespaces for now, as to avoid surfacing new PhD render errors. Final reductions:
Also, exports DOCTYPE node as doc-base/temp/doctype.dtd, so code that needs to know all DTD entities used in manuals can consult this file. Comments and reviews are welcome. Plan to merge this in one week. |
Sorry, something went wrong.
@jordikroon , this may interest you. This has the potential to eliminate all <entities> loading for docbook-cs, because AFAIK this node contains all entities used in a assembled manual, in correct order, so docbook-cs can consume only this file, and parse only one format, to get all entities of manual at once. My next step in configure is to minimize the DOCTYPE node to a single configure definition and usage, and by so, to restrict the SGML/DTD entity subsystem to only this line, in all manual.xml. |
Sorry, something went wrong.
|
Delaying this again, as to wait for DTD minimization. DTD minimization on doc-base side produces identical XML, but on doc-en side produces XML differences, including in namespaces. Let them run and render for a few days before making a change that eliminates about 85k of XML namespace (re)declarations. |
Sorry, something went wrong.
|
Tested today, only in doc-en for now. Detected some surprising differences, documented in php/phd#265 . Nothing that blocks this into being merged, but surprising differences anyway. I plan to wait another full week, before merging this. Further comments and reviews are welcome. |
Sorry, something went wrong.
|
Merged. docbook/docbookwsi.php is added, but unused. PhD is already surfacing HTML differences for insignificant XML changes (doctype, comments, duplicated namespaces), with also file differences. Let's wait until these are worked out before adding more differences caused by insignificant Docbook whitespace removal. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR trims the generated Docbook XML file of PHP Manual, assembled by doc-base/configure.php. It strips:
Statistics:
I'm surprised that the time increase is so small, but more surprised to see a reduction in Maximum resident set size. This means that the peak memory occurs later in configure (or any of its subs scripts), after the initial assembly.
Testing with PhD will be done in future. I expect no functional changes, but a full test is necessary anyways. PhD developers may need to check this very critically. Included a tool to recalculate the list, in the case the RNGs are updated.
Comments and reviews are welcome. Plan to wait at least two weeks before merging.