diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-05-09 22:19:01 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-05-09 22:19:01 +0200 |
commit | f56daa40756cb4f356c283567de9cbc050bd86b1 (patch) | |
tree | 778a1bbada2a00acc854a85721f36618b6ce4f6b /module/entry-points | |
parent | Clean up util header. (diff) | |
parent | Add short commentary on difference between parse and parse/component. (diff) | |
download | calp-f56daa40756cb4f356c283567de9cbc050bd86b1.tar.gz calp-f56daa40756cb4f356c283567de9cbc050bd86b1.tar.xz |
Replace iCalendar parser.
The old iCalendar parser was a direct port of my C parser, which
unfortunately clashed with guile's evaluation model, and was therefore
really slow.
This new one is much schemier [sic?], and therefore much faster. On my
laptop the parse time went from around 10s to 2.5s, so a 4x speedup!
Diffstat (limited to '')
-rw-r--r-- | module/entry-points/benchmark.scm | 8 | ||||
-rw-r--r-- | module/entry-points/html.scm | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/module/entry-points/benchmark.scm b/module/entry-points/benchmark.scm index 4843a80a..701d786b 100644 --- a/module/entry-points/benchmark.scm +++ b/module/entry-points/benchmark.scm @@ -3,15 +3,15 @@ :use-module (ice-9 getopt-long) :use-module (util) - :use-module (vcomponent) + :use-module (util app) ) (define opt-spec - '((file (value #t) (single-char #\f)))) + '()) (define (main args) (define opts (getopt-long args opt-spec)) - (cond [(option-ref opts 'file #f) => (compose load-calendars* list)] - [else (load-calendars)])) + (write (getf 'calendars app: (current-app))) +) diff --git a/module/entry-points/html.scm b/module/entry-points/html.scm index e03e5907..1237f628 100644 --- a/module/entry-points/html.scm +++ b/module/entry-points/html.scm @@ -66,4 +66,7 @@ [(table) (html-table-main count start)] [else - (error "Unknown html style: ~a" style)])) + (error "Unknown html style: ~a" style)]) + + ((@ (util time) report-time!) "all done") + ) |