Skip to content
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

Replaced vobject by icalendar. #28

Closed
wants to merge 1 commit into from
Closed

Conversation

tonioo
Copy link

@tonioo tonioo commented Apr 6, 2018

I recently added a calendar plugin to the project I work on (Modoboa, https://github.com/modoboa/modoboa-radicale) and during my tests, I realized vobject was extremely slow to parse recurring rules. Since I'm not the first one to report this behaviour, I've replaced it by icalendar which offers better performance.

@tobixen
Copy link
Member

tobixen commented Apr 6, 2018

You're not the first one to send such a pull request, the problem with this is the need to keep things backward compatible. It's been a while since I looked into this, but I believe the icalendar and vObject libraries are not completely compatible.

@tonioo
Copy link
Author

tonioo commented Apr 6, 2018

I understand your concerns but in my case (and I guess it was the same for others if you already received such a PR), it's just unusable with vobject... That might be a huge refactoring but what about a backend mechanism? Let people choose vobject and icalendar?

@tobixen
Copy link
Member

tobixen commented Apr 6, 2018

Letting people choose between icalendar and vobject somehow while also marking vobject as deprecated in the documentation. Perhaps finding new names for the methods giving access to the icalendar objects. Perhaps importing the vobject library only when needed (since it is becoming an optional dependency)

embie27 added a commit to embie27/caldav that referenced this pull request Dec 17, 2018
tobixen added a commit that referenced this pull request May 20, 2020
Gives a new propery calendar_item.icalendar_instance.

The .instance property will still give a vobject, and icalendar is not
listed as a requirement yet - icalendar module will be imported late,
when needed.  In version 1.0, probably this will be reversed, with
vobject being an optional dependency and icalendar being used
internally.

This commit also changes the way data is stored, the new logic ensures
data is stored authoratively either in _data, _vobject_instance or
_icalendar_instance.  So, mess up .e. with
event.vobject_instance.vevent.due.value and it will be refleted in
event.data.  It wasn't so earlier, but during the save operation, the
instance would be given priority.

Resolves #1 - references #97 #92 #3 and #28
@tobixen
Copy link
Member

tobixen commented Oct 15, 2020

I'll close this pull request, as the master branch now supports icalendar objects

@tobixen tobixen closed this Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants