Short description

it is useful for wiki performance to implement the following deactivated feature in rss_rc.py.

http://hg.moinmo.in/moin/1.9/file/c12c28282eab/MoinMoin/action/rss_rc.py#l66

User Story
I have discussed this matter with ThomasWaldmann. Therefore i am just pasting our discussion.

[15:50] <Muc> Can somebody tell me please that where can i change the _Max_DAYS for the rss feed. i have looked in the rss_rc.py. but here is not defined the _max_days. i have also changed the _Max_DAYS in the recentChanges.py but there is no effect on the rss feed. it always get the 15 feeds for unlimited days.
[15:48] <Muc> The problem is that when a user who cannot allow to see the most pages of wiki. He can only see the very small part of the wiki . when he gets the rss for the wiki then server needs 50% cpu and wiki gets slow for other users. Because max_rss is 15 and max_rss_days are unlimited. I think then wiki has to do lot of process in the log file to get the 15 items. it counts the 15 rss items in last 5 months therefore wiki needs lot of cpu and file I/O.
[15:50] <Muc> I want to get the max_items = 15  for 1 day (not for unlimited days). Therefore i want to implement the _MAX_DAYS in rss_rc.py

[16:46] <Muc> #if log.dayChanged() and log.daycount > _MAX_DAYS: break        can somebody please help me to implement this code in rss_rc.py.

[17:09] <ThomasWaldmann> Muc: it uses an items_limit (hardcoded, not configurable of 100, see line 34)
[17:09] <Muc> ThomasWaldmann: http://hg.moinmo.in/moin/1.9/file/c12c28282eab/MoinMoin/action/rss_rc.py#l66

[17:09] <ThomasWaldmann> that is commented, i.e. not active
[17:10] <ThomasWaldmann> and it looks like a relict that should be removed

[17:12] <ThomasWaldmann> Muc: btw, what's your server hardware / OS. I am wondering a bit that this is an issue for you.

[17:13] <Muc> thomaswaldmann:yes it is a performance issue.

[17:25] <ThomasWaldmann> Muc: it likely has a reason that this code is not active
[17:26] <ThomasWaldmann> you can limit the items that this user's rss client fetches by using the url ...?action=rss_rc&items=5
[17:28] <Muc> oooo Good, if i can fetch the items with url ..let me check pleae. and i tell you my hardware .
[17:29] <ThomasWaldmann> (the count is the number of readable items)
[17:32] <Muc> ThomasWaldmann: Hardware is Dell machine with server 2003R2 / 3.19GHz processor quard core / 4GBRAM
[17:32] <ThomasWaldmann> Muc: oh :-X
[17:39] <ThomasWaldmann> Muc: if using a specific url doesn't help with your performance issue, you can also add code to limit the max amount of log entries it searches (no matter whether the user can read them or not)
[17:41] <Muc> ThomasWaldmann: wait i am doing changes on my feedreader url then i tell you? give me a sec
[17:42] <ThomasWaldmann> Muc: btw, what auth are you using with your feedreader?
[17:46] <Muc> ThomasWaldmann> Apache/2.2.13 (Win32) mod_wsgi/2.6 Python/2.6.2              mod_auth_sspi/1.0.4
[17:51] <Muc> ThomasWaldmann: now i tell you my results.
[17:55] <Muc> ThomasWaldmann: with &items=5 is working good but not better, because it searches into log for these 5 entries from Gestern, 8. Juni 2011, 10:24:11 to Donnerstag, 12. Mai 2011, 15:03:36
[17:56] <Muc> if i can add the max_days in the rss_rc.py then it should be ok. because then it will search for entries under one day.
[17:57] <ThomasWaldmann> log does not have that daychanged api
[17:57] <ThomasWaldmann> so the only easy hack is to limit log entries searched


CategoryFeatureRequest

MoinMoin: FeatureRequests/MAX_DAYS-InRssFeed (last edited 2011-06-10 09:45:03 by Tinku)