haskell / xhtml

XHTML combinator library
http://hackage.haskell.org/package/xhtml
Other
9 stars 9 forks source link

Use a different type than `String` #16

Open parsonsmatt opened 1 year ago

parsonsmatt commented 1 year ago

I'm investigating the performance of Haddock and noticed that this library uses String pervasively.

It appears that the majority of the library is using these Strings not for introspection but for construction and then final rendering. I'd use Data.ByteString.Builder for that.

cdornan commented 1 year ago

I agree — but I am not aware of plans to fix this. I think the package is regarded as lagacy, anyone caring about performance more more likely to move to one of the more modern alternatives.

parsonsmatt commented 1 year ago

This package is used in haddock since it is a boot package. Rendering HTML is currently a problem for our build at work. I'm investigating a way to fix this without digging into all these guts, but there are some prety low hanging fruit here.

I can put some time/effort into providing a migration.

cdornan commented 1 year ago

@parsonsmatt if you want work on this I am very happy to assist — as long as no heavy lifting is involved as I do not have the bandwidth right now. Would you be interested in becomming a maintainer?

parsonsmatt commented 1 year ago

Sure! I'd be happy to contribute a bit here.

cdornan commented 1 year ago

@parsonsmatt OK consider yourself an xhtml maintainer while I work out how to get you commit rights, etc.

Bodigrim commented 1 year ago

@parsonsmatt if you want work on this I am very happy to assist — as long as no heavy lifting is involved as I do not have the bandwidth right now. Would you be interested in becomming a maintainer?

Tangentially, it might be a good idea to ask CLC to adopt this package as one of core libraries. Dependencies of haddock are pretty much core ;)

cdornan commented 1 year ago

FWIW, I would be very happy for the CLC to pick this up -- I think it makes a great deal of sense.

Bodigrim commented 1 year ago

@cdornan are there any other stakeholders whom I should ask as well? CC @parsonsmatt

cdornan commented 1 year ago

@Bodigrim there are no other stakeholders that I am aware of.

Bodigrim commented 1 year ago

CLC has approved adopting xhtml as a core library in https://groups.google.com/g/haskell-core-libraries/c/_VweuQrNG6c/m/72NtkR_5AwAJ.