Giter Site home page Giter Site logo

Comments (8)

fryguybob avatar fryguybob commented on June 2, 2024

(Imported. Original comment by [email protected] on March 11, 2012, 07:07:12 PM UTC)

In fact I have been working on this very thing for the past day or so! I will send a message to the mailing list with some issues for discussion and feedback soon.

from diagrams-core.

byorgey avatar byorgey commented on June 2, 2024

See https://groups.google.com/d/msg/diagrams-discuss/saNEFpMe9-Y/jvyZQiDUuIoJ, and also http://www.haskell.org/haskellwiki/Diagrams/Dev/Freezing for discussion of some relevant issues.

from diagrams-core.

jeffreyrosenbluth avatar jeffreyrosenbluth commented on June 2, 2024

Next Steps to enhancing performance by passing a tree to the backends:

  1. Test Compile.hs code in branch backend-tree by writing a version of prims for DTree.

https://github.com/diagrams/diagrams-core/blob/backend-tree/src/Diagrams/Core/Compile.hs

  1. Reimplement SVG backend to take a DTree instead of a list of Prims
  2. Implement optimization passes for Dtrees.

from diagrams-core.

jeffreyrosenbluth avatar jeffreyrosenbluth commented on June 2, 2024

Status Report:
byorgey has implemented a version of dual-tree that allows access to internal d nodes in foldDUAL.

https://github.com/diagrams/dual-tree/blob/internal-d/src/Data/Tree/DUAL/Internal.hs

This is used in the toTree function in the module Compile.hs to translate a QDiagram to a simpler tree DTree that dispenses with the u annotations. I have written another function fromDTree which creates an RTree from the DTree. The difference being that an RTree separates out the frozen and unfrozen transformations so that the frozen transformations get their own nodes and the unfrozen transformations accumulate until frozen or reach a primitive. An RTree should be easy to handle in the backends.

https://github.com/diagrams/diagrams-core/blob/backend-tree/src/Diagrams/Core/Compile.hs#L64

I have implemented this for the SVG backend except for handling clipping.

https://github.com/diagrams/diagrams-svg/blob/optimize/src/Diagrams/Backend/SVG.hs#L165

from diagrams-core.

byorgey avatar byorgey commented on June 2, 2024

This is now all implemented and merged. Both the SVG backend and the cairo backend make use of the new exposed tree structure.

from diagrams-core.

jeffreyrosenbluth avatar jeffreyrosenbluth commented on June 2, 2024

Nice !!!

from diagrams-core.

byorgey avatar byorgey commented on June 2, 2024

Thanks for your work on this. I'm really happy with where we ended up. From here I think there are a lot more incremental improvements we can make, both in optimizing the output of toRTree and in the SVG backend in particular.

from diagrams-core.

jeffreyrosenbluth avatar jeffreyrosenbluth commented on June 2, 2024

Your welcome,
I'm really happy with the end result as well.
I look forward to discussing further improvements.

On Thu, Nov 7, 2013 at 10:45 PM, Brent Yorgey [email protected]:

Thanks for your work on this. I'm really happy with where we ended up.
From here I think there are a lot more incremental improvements we can
make, both in optimizing the output of toRTree and in the SVG backend in
particular.


Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-28032472
.

from diagrams-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.