-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve time of parsing larger .ics files #66
Comments
It may also be worth mentioning that use iCal::Parser;
my $parser=iCal::Parser->new();
my $hash=$parser->parse(shift);
|
Hi, sorry for the delay. I think your idea looks pretty good, I'll implement it with some user parameters to control the range. Feel free to make a PR with this snippet. About perl, it's cool, but I'd prefer not to introduce an additional dependency to improve in a niche feature, let's keep it in python. p.s. although I wish the range feature was implemented directly in pyics library. |
The reason I mentioned |
Today I made a (hopefully) interesting discovery: first I configured Then I installed To me it seems there's definitely a lot of room for improvements. |
As I was digging through First the code that loads the same
And here is result of an execution:
As a matter of fact I found the numbers too good to be true but on the other hand I do see the event names and times. I would very much welcome having your opinion. |
Wow, that's interesting! Initially I went with
So if it is possible with |
All that seems to be supported with
|
Made an experimental branch with event parsing handled by |
Here is a little example of
|
The ICS file of my personal Google calendar, which includes entries dating back to 2012, is approximately 680 KB and encompasses nearly 1700 events. It takes approximately 14 seconds for
python-ics
to parse all entries which considerably delays the startup time ofcalcure
.It would be great if
calcure
gains the ability to optionally filter entries and discard those which are too far from today's date.This is a very basic (and likely buggy) implementation which only considers entries from current year:
In my case it resulted in a greatly reduced file size and parse time:
Calcure loading time:
Limiting my view to only events from the current year is a price I am willing to pay if the program starts in about a second.
The text was updated successfully, but these errors were encountered: