Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)Smaller files == faster loads? (old data)
Pages: [1]   Go Down
Print
Author Topic: Smaller files == faster loads? (old data)  (Read 304 times)
0 Members and 1 Guest are viewing this topic.
Zim
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: January 28, 2004, 12:28:00 PM »

While trying to debug a problem I'm having with spruious line-feeds in my events.txt file, I also noticed that its now a 200k file.

Made me wonder *if* somehow removing the old events might speed up load/search times (no idea by how much).

Also, to be slick, if I could create a second calendar with these old events that the main calendar would automaticaly call instead, when someone wanted to see the past.

And/or have the calendar user events_old.txt when month/year of request is older than this month... something like that.

Thoughts?

Cheers,
Mike

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: January 29, 2004, 02:29:00 PM »

** Made me wonder *if* somehow removing the old events might speed up load/search times **

I'm sure it would, I have no idea by how much.

** Also, to be slick, if I could create a second calendar with these old events  **

There is the 'Move Event' plug-in which could do that or maybe TubaDave's 'DeleteOld' plug-in could be modified to move the events instead of delete them?

** the main calendar would automaticaly call instead, when someone wanted to see the past. **

I'm sure something like that could be programmed but might run into a problem if a date search for spanned both calendars. There is always the Meta Calendar program which might be able to be modified to be used in such a case??

Dan O.

------------------

Logged
Zim
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: February 12, 2004, 03:55:00 PM »

I looked at this a bit, the plug-in calls deleteRecords in lib/DBFile.pm.  I don't see any functions there such as copyRecord, nor do I see a writeRecord with file name as an option, as in

getRecord -> writeRecord (to 2nd file) -> deleteRecord

I might be more tempted to hack it from the outside and use the event_id to grep the events.txt file and schedule.txt file for the lines, pasting them into a new set of files.  Not a pretty hack.

Mike

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: