Description

"LikePages" does not work in a sensible way on subpages. This effects the time to load the "edit page".

Steps to reproduce

Open MoinMoinBugs/JustAnExample and you will see a long list of all pages starting with "Moin" and it may take a while. This is the way that "LikePages" work and it makes setting up new pages very slow on a large site with a hierarchy.

My Suggestion: In the example "LikePages" should look for "Just" execept for "Moin". See patch below.

Example

Component selection

Details

Patch:

Index: LikePages.py
===================================================================
RCS file: /cvs/moin/MoinMoin/action/LikePages.py,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 LikePages.py
--- LikePages.py        25 Jun 2006 12:20:41 -0000      1.1.1.3
+++ LikePages.py        15 Feb 2007 11:17:46 -0000
@@ -132,7 +132,7 @@
     @return: start, end, matches dict
     """
     if start_re is None:
-        start_re=re.compile('([%s][%s]+)' % (config.chars_upper,
+        start_re=re.compile('(?:.*/)([%s][%s]+)' % (config.chars_upper,
                                              config.chars_lower))
     if end_re is None:
         end_re=re.compile('([%s][%s]+)$' % (config.chars_upper,
@@ -161,7 +161,7 @@
         if name.startswith(subpage):
             matches[name] = 4
         else:
-            if name.startswith(start):
+            if name.startswith(start) or "/"+start in name:
                 matches[name] = 1
             if name.endswith(end):
                 matches[name] = matches.get(name, 0) + 2

This reduces the time to display the edit page from 13 sec to below 3 sec in some examples on my local wiki.

MoinMoin Version

1.5.7

OS and Version

linux

Python Version

Server Setup

cgi/fcgi

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Discussion

This is a FeatureRequest

Plan


CategoryMoinMoinBug CategoryFeatureRequest

MoinMoin: MoinMoinBugs/ImproveLikePagesOnSubPages (last edited 2007-10-29 19:22:00 by localhost)