mbutterick / pollen-users

please use https://forums.matthewbutterick.com/c/typesetting/ instead
https://forums.matthewbutterick.com/c/typesetting/
52 stars 0 forks source link

RFC breaking change: removal of certain `setup` options #50

Closed mbutterick closed 4 years ago

mbutterick commented 4 years ago

I’d like to get rid of these user-configurable setup values, because I don’t believe they’re widely used (if at all), and Pollen accesses them frequently, which means a performance cost for no benefit.

The result of removing these is that the default value (shown on the right) would become the permanent, immutable value. Projects that have not overridden these values would work exactly the same way.

(define-settable preproc-source-ext 'pp)
(define-settable markup-source-ext 'pm)
(define-settable markdown-source-ext 'pmd)
(define-settable null-source-ext 'p)
(define-settable pagetree-source-ext 'ptree)
(define-settable template-source-ext 'pt)
(define-settable scribble-source-ext 'scrbl)
(define-settable poly-source-ext 'poly)
(define-settable cache-dir-name "compiled")
(define-settable cache-subdir-name "pollen")
(define-settable template-prefix "template")
(define-settable fallback-template-prefix "fallback")
(define-settable template-meta-key "template")
(define-settable main-export 'doc)
(define-settable meta-export 'metas)
(define-settable meta-tag-name 'meta)
(define-settable define-meta-name 'define-meta)
odanoburu commented 4 years ago

I don't use them! but I'm curious: how big an impact do they have on performance? does Racket profiling capture this kind of thing? (I've never used define-settable)

mbutterick commented 4 years ago

It produced a small improvement when I tested the change with my Pollen projects (I haven’t used the Racket profiler). But it’s not on the level of, say, parallel processing or issue #49.

odanoburu commented 4 years ago

I see! well, if no one is using it and it gets us better perfomance + simplifies the code, it looks great :)

mbutterick commented 4 years ago

I have pushed Pollen v3.0 (incrementing the major version number because strictly speaking, this is not a backward-compatible change, but in practice, it’s not going to disrupt many proejcts).