getting nonsense renders
Closed this issue · 23 comments
i don't know whats making it "glitch" so hard
I sometimes had to use a different browser to get bigger SVGs rendered properly. That may or may not be the issue here of course.
Carter, thanks for looking at this. I built the Hackage version of ghc-event-log
and the HEAD version, and ran both on the ex0.hs from http://www.well-typed.com/blog/86/. In the images below, you can see that text and lineweight are too bold in the diagrams-1.2
version, but nowhere near as bad as you're experiencing. Thoughts on how your setup might differ from mine? (Linux NixOS; ghc-7.6.3; Firefox-bleeding-edge).
Hackage: http://bergey.s3.amazonaws.com/diagrams/ex.hackage.svg
how big was your eventslog file? Mine on even a 3-5 second run of the program in question was 12mb.
https://s3.amazonaws.com/carterschonwald/smokesignal.eventlog is the eventlog in question
Indeed, line thickness in HEAD seems to be too big. That ex.hackage.svg you posted renders just fine for me.
does the attached eventlog i pasted a link to render sanely with older ghc-events-analyze?
My eventslog file is 6.1 MB. With Hackage ghc-events-analyze
, I get the following error:
event-log$ .cabal-sandbox/bin/ghc-events-analyze smokesignal.eventlog +RTS -K100M
Generated smokesignal.totals.txt using default script
ghc-events-analyze: _shutdown not set
With HEAD, I get an SVG like you posted above. Why does the generated SVG fill several vertical screens? That's not a line-width problem.
the event log i linked above was from running the program in question with -N30 on a pretty beefy server. And where I killed the program ~ 5 seconds in, The fulllll event log would run a few gb, even 30 seconds would hit > 100mb event log
ok, i finally was able to massage a pre diagrams 1.2 build using diagrams 1.1 and it looks like all the font rendering stuff worked with diagrams 1.1 but not with diagrams 1.2
with diagrams 1.2 a hello world renders as
with diagrams 1.1 the same thing renders as
the styling is different, and theres NO text
The styling seems to be a line width issue. I still think you should replace lw zeroV
with lw none
.
I'm not sure what's going on with text. I don't remember testing SVGFonts with 1.2 so the bug may lie there.
so somehow the way blocks are rendered changed
Ah, that makes sense. We changed the default line width. It's easy to miss when updating code from 1.1, because there's no call to lw to change or to cause a type error. In particular, the default went from 0.01 (equivalent to Global 0.01) to Normalized 0.004 atLeast
Output 0.5.
I've added a note about this to the migration page. Let me know if I can do anything else to help. It looks as though you're very close to getting it working.
now whats left is figuring out why the text isnt working. Why doen't the text render? a build using diagrams 1.1 works fine
I'm also seeing this problem, and I can't figure out how to build it using diagrams 1.1 - the build fails like this:
src/GHC/RTS/Events/Analyze/Reports/Timed/SVG.hs:139:50:
Not in scope: ‘D.lwG’
Perhaps you meant ‘D.lw’ (imported from Diagrams.Prelude)
src/GHC/RTS/Events/Analyze/Reports/Timed/SVG.hs:141:50:
Not in scope: ‘D.lwG’
Perhaps you meant ‘D.lw’ (imported from Diagrams.Prelude)
Im not sure about the text issue, maybe it's the
default line width in SVGFonts.
@cartazio try replacing:
renderText :: String -> Double -> D
renderText str size =
D.stroke (F.textSVG' (textOpts str size)) # D.fc D.black # D.lc D.black # D.alignL
with
renderText :: String -> Double -> D
renderText str size =
D.stroke (F.textSVG' (textOpts str size)) # D.fc D.black # D.lc D.black # D.alignL # D.lw D.none
@simonmar As far as lwG
, I believe it was introduced in diagrams 1.2.
In 1.1 you would just write lw
@jeffreyrosenbluth that seems to work! the font might be a teeny bit small, but its def readable
I'll open a PR shortly
Great, I wonder if we should build this in to SVGFonts?
On Thu, Aug 7, 2014 at 2:21 PM, Carter Tazio Schonwald <
notifications@github.com> wrote:
I'll open a PR shortly
—
Reply to this email directly or view it on GitHub
#4 (comment)
.
It seems things render okay now. If there are still specific problems, please open new issues.