You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/configfile.rst
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ Config file format
3
3
==================
4
4
5
5
6
-
The :class:`davclient.get_davclient` method (and perhaps in 2.1, also ``davclient.get_calendar``) can read from a config file. It will look for it in the following locations:
6
+
The :func:`caldav.get_davclient`, :func:`caldav.get_calendar`, and :func:`caldav.get_calendars` functions can read from a config file. It will look for it in the following locations:
7
7
8
8
* ``$HOME/.config/caldav/calendar.conf``
9
9
* ``$HOME/.config/caldav/calendar.yaml``
@@ -13,7 +13,7 @@ The :class:`davclient.get_davclient` method (and perhaps in 2.1, also ``davclien
13
13
14
14
The config file has to be valid json or yaml (support for toml and Apple pkl may be considered).
15
15
16
-
The config file is expected to be divided in sections, where each section can describe locations and credentials to a CalDAV server, a CalDAV calendar or a collection of calendars/servers. As of version 2.0, only the first is supported.
16
+
The config file is expected to be divided in sections, where each section can describe locations and credentials to a CalDAV server, a CalDAV calendar or a collection of calendars/servers.
17
17
18
18
A config section can be given either through parameters to :func:`caldav.get_davclient` or by enviornment variable ``CALDAV_CONFIG_SECTION``. If no section is given, the ``default`` section is used.
19
19
@@ -25,9 +25,8 @@ The section should contain configuration keys and values. All configuration key
25
25
Calendar parameters
26
26
===================
27
27
28
-
Not implemented yet.
29
-
30
-
Probably in version 2.1 or version 2.2, ``calendar_name``, ``calendar_id`` and ``calendar_url`` can be used to specify a calendar.
28
+
The :func:`caldav.get_calendar` and :func:`caldav.get_calendars` functions accept
29
+
``calendar_name`` and ``calendar_url`` parameters to select a specific calendar.
Copy file name to clipboardExpand all lines: docs/source/performance.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
Performance
3
3
===========
4
4
5
-
The current maintainer of the CalDAV library was born in an age where memory and CPU was limited resources. CPU and memory comes cheaply today (read https://www.aardvark.co.nz/daily/2025/0611.shtml to see what I mean). The CalDAV and iCalendar protocols weren't really written for lean computing in the first place. If you need something that can run around on what used to be a bleeding edge supercomputer, you probably need to scrap those standards and write your own optimized calendaring standard and your own server and client for it - and this probably has to be done in C, not in Python.
5
+
The current maintainer of the CalDAV library was born in an age where memory and CPU was limited resources. CPU and memory comes cheaply today (read https://www.aardvark.co.nz/daily/2025/0611.shtml to see what I mean). The CalDAV and iCalendar protocols weren't really written for lean computing in the first place. If you need something that can run around on what used to be a bleeding edge supercomputer some decades ago, you probably need to scrap those standards and write your own optimized calendaring standard and your own server and client for it - and this probably has to be done in C, not in Python.
6
6
7
7
Still, sometimes all the extra bloat I've added to the CalDAV library makes me cringe a bit. If you have issues with performance, please reach out (see the :ref:`contact:contact` document).
8
8
9
9
Some thoughts:
10
10
11
-
* While CPU and memory comes cheaply today, latency is often a problem. Creating server requests and particularly initiating TCP connections are typically costly. There are a number of places in the code where it may be possible to reduce the number of requests. As of 2.x, consider reading the top of the CHANGELOG - utilizing the niquests rather than requests library may possibly make the server communication more snappy.
11
+
* While CPU and memory comes cheaply today, latency is often a problem. Creating server requests and particularly initiating TCP connections are typically costly. There are a number of places in the code where it may be possible to reduce the number of requests. As of v3.x, **niquests** is used by default for HTTP communication, bringing HTTP/2 and HTTP/3 support, this should make things more snappy. See the :doc:`http-libraries` document for details. It's also possible to enable multiplexing by enabling `http.multiplexing` in the server `features` setting. (it's disabled by default because a handful of servers out there can't handle the authentication if multiplexing is enabled)
12
12
* In the early days almost all the necessary handling of icalendar data was done by accessing it as ``event.data``. This may be the most efficient - but the ``vobject`` was also utilized. Due to popular demand, plus the fact that ``vobject`` was not mainained for a while, ``icalendar`` took over. I can imagine it does takes some CPU to convert the data between ical strings and instances. This is done every time the data is accessed in a different format. For performance reasons, I was initially not very happy to use the icalendar library for doing simple things like fetching the UID from an event - but I've come to think that this is necessary. Now the problem is that every here and there there may still be some old code accessing ``event.data`` rather than ``event.icalendar_instance``. This probably causes the burning of quite a lot of CPU cycles!
0 commit comments