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

Avoid svg components duplication #44

Closed
geofjamg opened this issue Mar 18, 2019 · 2 comments
Closed

Avoid svg components duplication #44

geofjamg opened this issue Mar 18, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request Substation diagram

Comments

@geofjamg
Copy link
Member

  • Do you want to request a feature or report a bug?
    A performance improvement.

  • What is the current behavior?
    SVG voltage level diagram is made of individual SVG components, wires and busbar sections assembled together. SVG component are copied in to final SVG, so it means that if we have 10 loads in the substation the SVG symbol of the load is duplicated 10 times.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
    N/A

  • What is the expected behavior?
    We could reduce the size of the substation SVG by using "refs/use" feature of SVG https://developer.mozilla.org/fr/docs/Web/SVG/Element/use to avoid duplicating component SVG.
    This new feature has to be optional (a parameter in LayoutParameters), because JavaFX SVG rendering library probably (to check) don't support "refs/use".

  • What is the motivation / use case for changing the behavior?
    Reduce the SVG size and consequently increase rendering performance.

  • Please tell us about your environment:

    • PowSyBl Version: 2.5.0-SNAPSHOT
    • OS Version: Linux
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

@geofjamg geofjamg added enhancement New feature or request Substation diagram labels Mar 18, 2019
@FranckLecuyer FranckLecuyer self-assigned this Sep 5, 2019
FranckLecuyer added a commit that referenced this issue Sep 11, 2019
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
FranckLecuyer added a commit that referenced this issue Sep 12, 2019
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
FranckLecuyer added a commit that referenced this issue Sep 12, 2019
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
FranckLecuyer added a commit that referenced this issue Sep 12, 2019
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
@geofjamg geofjamg added this to To do in Substation diagram via automation Sep 17, 2019
@geofjamg geofjamg moved this from To do to In progress in Substation diagram Sep 17, 2019
FranckLecuyer added a commit that referenced this issue Sep 17, 2019
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
FranckLecuyer added a commit that referenced this issue Sep 17, 2019
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
FranckLecuyer added a commit that referenced this issue Sep 25, 2019
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
FranckLecuyer added a commit that referenced this issue Sep 27, 2019
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
FranckLecuyer added a commit that referenced this issue Sep 27, 2019
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
FranckLecuyer added a commit that referenced this issue Oct 2, 2019
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
FranckLecuyer added a commit that referenced this issue Oct 7, 2019
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
FranckLecuyer added a commit that referenced this issue Oct 7, 2019
Resolving conflicts

Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
geofjamg pushed a commit that referenced this issue Oct 7, 2019
* Avoid svg components duplication #44

Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>

* Avoid svg components duplication #44

Resolving conflicts

Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
@geofjamg geofjamg moved this from In progress to Done in Substation diagram Oct 7, 2019
@CBiasuzzi
Copy link
Contributor

when parameter avoidSVGComponentsDuplication is set, is it expected that
a lot of elements end up duplicated in the "defs" section?
e.g. in substation-diagram/substation-diagram-core/src/test/resources/TestCase12GraphVL1_optimized.svg, defs section,
there are multiple copies, for the same component type ...

@FranckLecuyer
Copy link
Contributor

You're right.
In fact, it's a regression introduced by issue #157, which leads to the suppression of the ComponentType enum
I correct that immediatly
Thanks for your comment ...

FranckLecuyer added a commit that referenced this issue Oct 8, 2019
Correction in the defs section generation when using the parameter
avoidSVGComponentDuplication

Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
FranckLecuyer added a commit that referenced this issue Oct 8, 2019
Correction in the defs section generation when using the parameter
avoidSVGComponentDuplication

Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
geofjamg pushed a commit that referenced this issue Oct 8, 2019
Correction in the defs section generation when using the parameter
avoidSVGComponentDuplication

Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
@geofjamg geofjamg closed this as completed Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Substation diagram
Projects
Development

No branches or pull requests

3 participants