Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unescaped '<' error in exported SVG? #16

Closed
timholy opened this issue Aug 12, 2014 · 10 comments
Closed

Unescaped '<' error in exported SVG? #16

timholy opened this issue Aug 12, 2014 · 10 comments

Comments

@timholy
Copy link
Owner

timholy commented Aug 12, 2014

I was looking into package load times, and did the following (must do a Pkg.update() before trying this):

PROFILEVIEW_USETK=false
using DataFrames, ProfileView
@profile reload("DataFrames")
ProfileView.svgwrite("/tmp/reloadDataFrames.svg", C=true)

When I try to view the resulting file with chromium, it partially renders but then I get this:

This page contains the following errors:

error on line 13669 at column 70: Unescaped '<' not allowed in attributes values
Below is a rendering of the page up to the first error.

I don't get that error if I omit C=true.

CC @darwindarak, any ideas?

@timholy
Copy link
Owner Author

timholy commented Aug 12, 2014

If I do this:

bt, lidict = Profile.retrieve();
for (k,v) in lidict
    str = string(v)
    if !isempty(search(str, "<"))
        println(str)
    end
end

then I get no output. So it doesn't seem that there's a "<" inside any of the function names or whatever.

@darwindarak
Copy link
Collaborator

I'm running into a different problem when using C=true. It takes a very long time for the images to render on Firefox and Chrome (both browsers prompted me to stop the script), but no errors are showing up on the console. Do you mind posting your SVG output on Gist? I'm pretty sure this issue is caused by the text scaling part of the code, just can't quite pinpoint it yet.

@timholy
Copy link
Owner Author

timholy commented Aug 13, 2014

It's about 5Mb. I posted it to my google drive, but I'm getting a "sharing unavailable, try again later" message. I'll try again later. Thanks for looking at this!

@timholy
Copy link
Owner Author

timholy commented Aug 13, 2014

timholy added a commit that referenced this issue Aug 13, 2014
This also makes svgwriter available by default.
timholy added a commit that referenced this issue Aug 13, 2014
Escape characters in shortinfo, too. Fixes (#16)
@timholy
Copy link
Owner Author

timholy commented Aug 13, 2014

I figured it out, see df74874.

@timholy timholy closed this as completed Aug 13, 2014
@timholy
Copy link
Owner Author

timholy commented Aug 13, 2014

But wow is rendering slow. See JuliaLang/julia#7977 (comment).

@darwindarak
Copy link
Collaborator

Yeah, that makes this backend useless for larger datasets. I think it might be fixable though. Currently when the viewport is scaled, it's going over all the text and un-scaling it to prevent stretching. I think that's where the bottleneck is. I'm going to try for a rewrite this weekend to speed it up.

If only there was something like ProfileView for
the browser.

@timholy
Copy link
Owner Author

timholy commented Aug 13, 2014

😄

Thanks for looking into this!

@waldyrious
Copy link

@darwindarak doesn't chrome have something like that? Although I believe it's just for the javascript engine, not the rendering engine.

@darwindarak
Copy link
Collaborator

That's perfect, thanks! I don't think there's much I can do about the rendering engine, so a javascript profiler is just what I need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants