[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: JDK-8193445 Performance Test (CSS applied redundantly)
From:       Dean Wookey <wookey.dean () gmail ! com>
Date:       2019-01-18 8:12:31
Message-ID: CAKZ_BFjj3=rY=VWQj5_D4MsEx35o3Yju1MUjheuNhAheGw7huA () mail ! gmail ! com
[Download RAW message or body]

The last time the issue was discussed was in November. You can see the
thread here:
https://mail.openjdk.java.net/pipermail/openjfx-dev/2018-November/022837.html

I too would like to see this and other performance issues addressed
(although our actual biggest priority is mobile). Right now my team is
building javafx ourselves with this fix:
https://github.com/DeanWookey/openjdk-jfx/commit/65a1ed82bce262294f1969e9a12e1126ec8a1ec6
and
we've been quite happy with it. Our application is fairly complex, and our
tables are particularly susceptible to css bugs. Our team hasn't seen
anything weird happen at all since we started using it. That may be a
solution for you until it's addressed. Alternatively you could try adding
the nodes to the scene graph incrementally, possibly even automatically
breaking a complex node into parts and rebuilding it while it's attached to
the scene. Something like this (I haven't actually tested this):

    public void addComplex() {
        BorderPane borderPane = new BorderPane();
        Pane complexNode = new Pane();
        addChild((n) -> borderPane.setCenter(n), complexNode);

        //or
        StackPane root = new StackPane();
        Pane complexNode2 = new Pane();
        addChild((n) -> root.getChildren().add(n), complexNode2);
    }

    public static void addChild(Consumer<Node> addChild, Node child) {
        if (child instanceof BorderPane) {
            BorderPane childBorderPane = (BorderPane) child;
            Node top = childBorderPane.getTop();
            Node bottom = childBorderPane.getBottom();
            Node left = childBorderPane.getLeft();
            Node right = childBorderPane.getRight();
            Node center = childBorderPane.getCenter();
            ArrayList<Node> all = copy(childBorderPane.getChildren());
            childBorderPane.getChildren().clear();
            addChild.accept(childBorderPane);
            addChild((n) -> childBorderPane.setTop(n), top);
            addChild((n) -> childBorderPane.setBottom(n), bottom);
            addChild((n) -> childBorderPane.setLeft(n), left);
            addChild((n) -> childBorderPane.setRight(n), right);
            addChild((n) -> childBorderPane.setCenter(n), center);
            for (Node node : all) {
                if (!childBorderPane.getChildren().contains(node)) {
                    addChild((n) -> childBorderPane.getChildren().add(n),
node);
                }
            }
        } else if (child instanceof Pane) {
            Pane childPane = (Pane) child;
            ArrayList<Node> all = copy(childPane.getChildren());
            childPane.getChildren().clear();
            addChild.accept(child);
            for (Node node : all) {
                addChild((n) -> childPane.getChildren().add(n), node);
            }
        } else if (child instanceof Group) {
            Group childGroup = (Group) child;
            ArrayList<Node> all = copy(childGroup.getChildren());
            childGroup.getChildren().clear();
            addChild.accept(child);
            for (Node node : all) {
                addChild((n) -> childGroup.getChildren().add(n), node);
            }
        } else {
            addChild.accept(child);
        }
    }

    private static ArrayList<Node> copy(ObservableList<Node> nodes) {
        ArrayList<Node> copy = new ArrayList<>();
        for (Node n : nodes) {
            copy.add(n);
        }
        return copy;
    }

On Thu, Jan 17, 2019 at 3:06 PM <daniel.weil@argosim.com> wrote:

> Does anybody has any information about a target release for fixing
> https://bugs.openjdk.java.net/browse/JDK-8183100 , this issue causing
> severe
> performance degradation since JDK1.8.172?
>
>
>
> Since JDK1.8.182, CSS is applied redundantly, leading too significant
> performance degradation, on scenes with many levels of hierarchy.
>
>
>
> I logged this issue in two JIRA in December 2018 (more than 1 year ago) :
>
> https://bugs.openjdk.java.net/browse/JDK-8193445
>
> https://bugs.openjdk.java.net/browse/JDK-8209830
>
>
>
> I've reported another issue
> https://bugs.openjdk.java.net/browse/JDK-8199216
> , showing performance and memory issue caused by Javafx PseudoClassState
> objects. This issue could be related to the previous ones.
>
>
>
> This is a really BLOCKING issue, our product is stuck with JDK1.8.162,
> blocking us for trying a migration to JDK10 or JDK11!
>
>
>
> Daniel Weil (ARGOSIM)
>
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic