aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent/load.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-03-09 23:47:05 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2020-03-09 23:47:05 +0100
commit3b8565c33b58196ffe2e3dd8f23a73de57a268f2 (patch)
tree9d3526ea9bcc2ba9a7eb797103549baeb3c3ce6c /module/vcomponent/load.scm
parentCleanup in HTML chunked main. (diff)
downloadcalp-3b8565c33b58196ffe2e3dd8f23a73de57a268f2.tar.gz
calp-3b8565c33b58196ffe2e3dd8f23a73de57a268f2.tar.xz
Sprinkled in some time prints.
Diffstat (limited to 'module/vcomponent/load.scm')
-rw-r--r--module/vcomponent/load.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/vcomponent/load.scm b/module/vcomponent/load.scm
index 0cb03b42..e3e6f192 100644
--- a/module/vcomponent/load.scm
+++ b/module/vcomponent/load.scm
@@ -1,6 +1,7 @@
(define-module (vcomponent load)
:export (load-calendars load-calendars*)
:use-module (util)
+ :use-module (util time)
:use-module (srfi srfi-1)
:use-module (datetime)
:use-module (datetime util)
@@ -17,7 +18,9 @@
;; Reads all calendar files from disk, generate recurence-sets for all repeating events,
;; and returns a list of calendars, and a stream of all events "ready" for display.
(define* (load-calendars #:key (calendar-files (calendar-files)))
+ (report-time! "Parsing ~a calendars" (length calendar-files))
(let* ((calendars regular repeating (load-calendars* #:calendar-files calendar-files)))
+ (report-time! "Calendars loaded, interleaving and reccurring")
(values
calendars
(interleave-streams
@@ -39,8 +42,10 @@
(children cal)))
calendars)))
+ (report-time! "Parse done, partitioning...")
(let* ((repeating regular (partition repeating? events)))
+ (report-time! "Sorting")
;; NOTE There might be instances where we don't care if the
;; collection if sorted, but for the time beieng it's much
;; easier to always sort it.