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

Reply via email to