incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Jaquith <andrew.r.jaqu...@gmail.com>
Subject Re: Parsing fun
Date Wed, 14 Oct 2009 17:59:45 GMT
All good points, and after thinking about it for 30 seconds I agreed.
I've added a fairly tactical set of patches to JSPWikiMarkupParser and
MarkupParser.cleanlink (which had a bug in it!). It fixes the broken
unit tests and sidesteps the larger refactoring issue. Let's get 3.0
stable before we revisit.

Andrew

On Wed, Oct 14, 2009 at 11:48 AM, Janne Jalkanen
<Janne.Jalkanen@ecyrd.com> wrote:
>
> On Oct 14, 2009, at 03:11 , Andrew Jaquith wrote:
>
>> Oh, on a side note: getFinalPageName() moved to WikiEngine. That's
>> where it calls the various PageNameResolvers.
>
> Yeah, but it lost the old-style links on the way. Probably my bad.
>
>>
>> Would it be better to move the wikifyLink and cleanLink code into the
>> resolver code, perhaps make these additional resolvers? I'd have to do
>> a bunch of changes to caller code: about 25 references, not too bad.
>
> I would rather put them in an utility class, like TextUtil (PageNameUtil?).
>
>> Also, we could add a "CacheResolver" that simply keeps a cache of all
>> of the strings that have been requested, and the WikiPaths they
>> resolve to. Just a thought.
>
> Unless this can be shown to be an actual performance bottleneck, I wouldn't.
>  For example, that CacheResolver would need to keep track of all page
> renames and changes, and there are some edge cases creating some
> hard-to-find bugs...  CachingProvider e.g. looks like a fairly
> straightforward thing, and that's been one of the biggest source of problems
> for people in 2.x :-)
>
> So let's optimize that once we know with confidence that 3.0 works. Then we
> can break it again.
>
> /Janne
>

Mime
View raw message