[webkit-dev] Is the New XMLParser dead?
abarth at webkit.org
Mon Aug 27 17:17:35 PDT 2012
On Mon, Aug 27, 2012 at 5:03 PM, Maciej Stachowiak <mjs at apple.com> wrote:
> On Aug 27, 2012, at 4:28 PM, Adam Barth <abarth at webkit.org> wrote:
>> On Mon, Aug 27, 2012 at 4:02 PM, Maciej Stachowiak <mjs at apple.com> wrote:
>>> On Aug 27, 2012, at 3:48 PM, Adam Barth <abarth at webkit.org> wrote:
>>>> On Mon, Aug 27, 2012 at 3:06 PM, Maciej Stachowiak <mjs at apple.com> wrote:
>>>>> On Aug 27, 2012, at 2:45 PM, Eric Seidel <eric at webkit.org> wrote:
>>>>>> Checking back in:
>>>>>> Curious if this effort is still underway. Adam and I would like to
>>>>>> delete the New XML Parser if it's not needed in order to simplify the
>>>>>> HTML 5 Parser again. :)
>>>>> We do tentatively plan to get back to it (the original implementor is currently working full-time at Apple on the WebKit team).
>>>> As far as I can tell, no one has worked on the NEWXML code in over a
>>>> year, the implementation doesn't work, and the code is disabled by all
>>>> ports. It seems like we should remove it from trunk. We can retore
>>>> it if/when someone is interested in working on it again.
>>> What you describe as the current status is (afaik) correct. The data point I provided (since Eric asked) is that we do in fact plan to get back to it.
>>>>> As far as simplifying the HTML5 parser - isn't most of the foundational work that touches the HTML5 parser also required for WebVTT, as mentioned by me in the email you quote below? Is there a big simplicity win to be had without breaking WebVTT? If so, we can think about whether removing the scaffolding and reconstructing it when needed is worthwhile.
>>>> This is a separate issue.
>>> If there's a reason to remove it other than "simplify the HTML5 parser again", then certainly we can consider it. But that was the only reason Eric cited, so I wanted to check if it's actually the case, in light of WebVTT. I am still curious about the answer. But I'd be happy to discuss other reasons instead.
>> My understanding is that we don't typically leave broken, unused code
>> in trunk unless someone is actively working on it. Having this code
>> around has costs and little benefit:
>> 1) The code needs to be maintained.
>> 2) The code confuses contributors who don't know that it's dead.
>> By contrast, if someone wants to work on this code again, they can
>> just revert the patch that removed it. They might need to do some
>> maintenance work at that point, but that's work that otherwise would
>> have to have been done by someone else.
> Do you have examples of actual confusion or undue additional maintenance? I think if those things were really happening, then that would make a decent argument for removing the code for the time being. From svn history, it doesn't look like the new xml parser code has been touched in quite some time, so I'm not seeing evidence for maintenance cost. But I could be overlooking other costs.
Both these things have happened with this code, albeit not often. How
we parse XML is already confusing because we have two separate
XMLDocumentParsers that are actually used (and, of course, a third one
that isn't ever used).
>> As for VTT, I suspect that the VTT parser doesn't need all the
>> complexity that the HTML parser needs. It's doing a much simpler task
>> and likely can be made much simpler by not try to share code with the
>> HTML parser at all.
> I think the main sharing in all three cases is the MarkupTokenBase and MarkupTokenizerBase base classes. So XML tokenizer causes (as far as I know) no additional abstraction or complexity beyond WebVTT.
> I am skeptical that either duplicating that particular code instead of sharing it, or rewriting the WebVTT tokenizer in some dramatically different way would be beneficial. Let's set the simplification argument aside unless there is some compelling concrete evidence for it (such as WebVTT hackers expressing interest in rewriting the WebVTT parser to not share code with HTML.)
My position is simple: the code is broken and unused. As a general
rule, we shouldn't keep broken, unused code in the tree for extended
periods of time. Therefore, we should remove it.
On Mon, Aug 27, 2012 at 5:04 PM, Maciej Stachowiak <mjs at apple.com> wrote:
> It's not anyone's immediate current task, and I can't really make firm promises about future timelines. But we actually are seriously interested in finishing it.
There's no urgency in removing it. If you're serious about working on
it, perhaps we should keep it around for another six months.
More information about the webkit-dev