Opened 4 years ago

Closed 19 months ago

Last modified 13 months ago

#7666 closed bug (invalid)

excessive space and time usage for rendering (somewhat) deeply nested Docs

Reported by: j.waldmann Owned by: dterei
Priority: normal Milestone: 8.0.1
Component: Core Libraries Version: 7.6.2
Keywords: Cc: ekmett
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

I was running into serious performance problems when printing moderately sized Doc and Xml data (HaXml goes via Doc).

Since pretty is shipped with ghc, this is potentially dangerous. Users will just assume that these core components are tried and tested, and working efficiently.

More info: http://article.gmane.org/gmane.comp.lang.haskell.cafe/103210

See also: http://stackoverflow.com/questions/9761507/which-pretty-print-library

Test case (builds an Xml tree with HaXml and renders it via the pretty library): https://github.com/jwaldmann/haskell-tpdb/blob/master/test/speed.hs

Change History (8)

comment:1 Changed 4 years ago by igloo

difficulty: Unknown
Milestone: 7.8.1
Owner: set to dterei

comment:2 Changed 3 years ago by thoughtpolice

Milestone: 7.8.37.10.1

Moving to 7.10.1

comment:3 Changed 2 years ago by thoughtpolice

Component: libraries/prettyCore Libraries

Moving over to new owning component 'Core Libraries'.

comment:4 Changed 2 years ago by thoughtpolice

Milestone: 7.10.17.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:5 Changed 19 months ago by thomie

Resolution: invalid
Status: newclosed

Closing as invalid, since the pretty bug tracker is here: https://github.com/haskell/pretty/issues.

I did try to build your testcase. But besides haxml, it also requires a package called tpdb, which itself has so many dependencies I gave up.

If you do reopen on the pretty bug tracker, pleas make the test smaller, include build instructions, and expected output.

comment:6 Changed 19 months ago by thomie

To be fair: tpdb probably had less dependencies when you submitted this bug. It also depends on wl-pprint-text now, perhaps because pretty is too slow/uses too much memory...

Anyway, please open a bug on the pretty bug tracker, it will hopefully get more attention there.

comment:7 Changed 18 months ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:8 Changed 13 months ago by j.waldmann

Cc: ekmett added

simplified test case entered into pretty's bug tracker: https://github.com/haskell/pretty/issues/32

Last edited 13 months ago by j.waldmann (previous) (diff)
Note: See TracTickets for help on using tickets.