At line 51 changed one line |
!!Pros & conds |
!!Pros & cons |
At line 53 changed one line |
||Ptro |
Places both (Page and Attachment) providers under a single api from wiki perspective. This should make the actual wiki engine cleaner. The single provider might have to read data from two different kinds of databases in case the attachments and pages are stored in different databases (you have the wrong database chosen and should suffer anyways due to |
making a double implementation). |
|
The functionality of the WikiPageContentProvider can be quite complex. Writing a simple |
base class that handles most of the complexity is probably wise. |
|
This is becoming pretty complex and I don't see any point in implementing this unless someone else than me feels that his is of any value. |
|
There might be more things that need to be stored (user settings, wiki settings, plugin settings). It would make sense to accommodate these somehow also. |
|
[NiiloNeuvo] |
|
---- |
!!Comments |
|
After looking at the times the PageProvider is accessed, and is actualy doing disk IO, I have implemented the following optimalizations on my system: |
* a negative page cache (caching pagenames/attachments that do not exist) |
** source of [CachedAttachmentProvider|https://www.aiko.sh/wiki_dev/xref/sh/aiko/wiki/providers/CachedAttachmentProvider.html]. |
** source of [CachingProvider|https://www.aiko.sh/wiki_dev/xref/com/ecyrd/jspwiki/providers/CachingProvider.html]. |
* a prevayler provider, which keeps all WikiPages (including txt) in memory. |
** source of [PrevaylerProvider|https://www.aiko.sh/wiki_dev/xref/sh/aiko/wiki/providers/package-summary.html] package. |
|
Effectivly my system currently has 2 levels of caching. |
# the CachingProvider (caching processed pages) and the CachedAttachmentProvider (caching nonexisting pages) |
# the PrevaylerProvider (keeping all current unprocessed versions of all pages) |
|
Attachments are not cached. |
|
At the moment I have a very few pages, so all this caching is realy just overkill :) |
|
''Side note: I've trailed from the JSPWiki tree pretty much now, so I decided to setup my own environment for my further developments. It is my intention to keepi a close eye on the JSPWiki cvs tree and merge those developments into my tree when applicable. If you like to see how it is working out... please visit [https://www.aiko.sh/wiki_dev/]'' |
|
2003-09-01 [AikoMastboom] |
|
---- |
|
Caching non-existant pages is a good source for memory leaks... 2.1.63 handles non-existant pages much more efficiently now, by simply assuming that if it's not on the list of all pages, it must not exist :-). |
|
2.1.63 also fixes a serious bug (corrected with a single, forgotten line) which caused the CachingProvider to sometimes forget it had ever seen a page. |
|
I also put these fixes on 2.0.51. |
|
I will also add a ~CachingAttachmentProvider, since Niilo convinced me that it is a problem. |
|
-- JanneJalkanen |
|
---- |
|
Well, I did not yet look deeper into the code, but to avoid memory leaks I work with {{SoftReference}}. This allows me to cache everything without caring about {{OutOfMemory}}. |
|
-- [Bebbo] |