RFC breaking change: removal of certain setup options #50

Closed
opened 4 years ago by mbutterick · 4 comments
mbutterick commented 4 years ago (Migrated from github.com)

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)
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. ```racket (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 (Migrated from github.com)

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)

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 (Migrated from github.com)

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.

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 (Migrated from github.com)

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

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 (Migrated from github.com)

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).

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).
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen-users#50
Loading…
There is no content yet.