Comments (8)
(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.
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.
Next Steps to enhancing performance by passing a tree to the backends:
- 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
- Reimplement SVG backend to take a DTree instead of a list of Prims
- Implement optimization passes for Dtrees.
from diagrams-core.
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.
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.
Nice !!!
from diagrams-core.
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.
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)
- support SVG blur effect on subdiagrams HOT 1
- A release with constraintskinds fix? HOT 3
- allow lens-4.17
- New release on Hackage to allow GHC 8.8.1 HOT 2
- Constraint synonym for any valid back end?
- Is it possible to serialize a diagram to a file and then render it with another program, another time? HOT 4
- diagrams-core introduced breaking change in a patch version HOT 5
- Relax upper bound constraints to build with base 4.15 HOT 21
- Support monoid-extras 0.6 and future versions of base (Option deprecation) HOT 2
- Doesn't work with old monoid-extras HOT 1
- Inconsistent code and doc for `atLeast`/`atMost` HOT 4
- Out of date git repo? HOT 1
- Please add support for recent versions of vector-space HOT 1
- New release for 7.10 HOT 3
- Attributes aren't type safe HOT 7
- Document (Transformable (Envelope ...)) instance HOT 2
- Problem installing diagrams with cabal... HOT 3
- Drop "xlink:" namespace for SVG 2.0 HOT 2
- Allow specifying the "target" attribute for links in SVG elements
- loosen upper bound of lens dependency for Stackage lts-11.0 compatibility
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diagrams-core.