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

DROOLS-4735: [DMN Designer] Grid performance is dire #3004

Merged
merged 5 commits into from Nov 22, 2019

Conversation

manstis
Copy link
Member

@manstis manstis commented Nov 12, 2019

See https://issues.jboss.org/browse/DROOLS-4735

Part of an ensemble:

This PR moves calculation of a row's height from "on demand" calculation of cells' heights to "on value set" i.e. the height of a cell is now calculated when it's value is set hence moving much of the expensive calculation to a far less frequently invoked point in the codebase.

This PR also ensures DMN's GridLayer is not instantiated (by Stunner) multiple times and subsequent event handlers attached to each instance (thus leading to multiple re-handling of events that slowed things down).

@manstis manstis changed the title == DO NOT MERGE == DROOLS-4735: [DMN Designer] Grid performance is dire DROOLS-4735: [DMN Designer] Grid performance is dire Nov 14, 2019
@jomarko
Copy link

jomarko commented Nov 19, 2019

Manual Review Note 1

When I compare files produced by kie-wb-distributions/business-central-parent/business-central-webapp and kie-wb-common/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-testeting the second one doesn't produce new line character in the source file. Is it expected? Not sure if caused by this PR.

@manstis
Copy link
Member Author

manstis commented Nov 19, 2019

Hi @jomarko this PR does not affect the UI to XML process at all so if client-side marshalling (kie-wb-common-dmn-webapp-kogito-testing) gives different text compared to server-side marshalling (kie-wb-distributions) it is an issue with one of the marshallers. These PRs just affects rendering of the grid on the screen.

@jomarko
Copy link

jomarko commented Nov 19, 2019

@manstis due to memory usage, should we keep client-site-marshalling this way (without new lines) or should I report a KOGITO issue?

@manstis
Copy link
Member Author

manstis commented Nov 19, 2019

Hi @jomarko I doubt the inclusion of (even 1000's of) new line characters will affect memory consumption unduly. It's more than likely the XML library we use client-side is not adding the characters (and having them does make the XML more human readable). Feel free to make a KOGITO JIRA (IIRC @tiagobento formats the XML in VSCode so we might be able to use the same function to format the output of the client-side marshaller before writing to file).

@jomarko
Copy link

jomarko commented Nov 19, 2019

@jomarko
Copy link

jomarko commented Nov 19, 2019

@manstis see my manual acceptance test results at https://issues.jboss.org/browse/DROOLS-4735

I definitely see an improvement so I think I could approve, but the saving and editing by mouse are quite important, please share your opinion.

@manstis
Copy link
Member Author

manstis commented Nov 19, 2019

@jomarko Hello, I left a comment on the JIRA regarding editing (i.e. I think a new JIRA is in order.. you can get the same result before this PR with larger tables). I think saving should also be a new JIRA as we'd need to see where the bottle neck is.. marshalling UI->XML or even XML->server.

@tiagobento
Copy link
Contributor

@manstis @jomarko I'm using native XSLT support on browsers to format the output from both DMN and BPMN editors on kogito-tooling extensions. You can see the rules we use here: https://github.com/kiegroup/kogito-tooling/blob/master/packages/kie-bc-editors/src/DefaultXmlFormatter.ts

@jomarko
Copy link

jomarko commented Nov 20, 2019

@manstis
Copy link
Member Author

manstis commented Nov 20, 2019

@danielezonca All issues resolved/commented.

Please re-review at your pleasure/leisure!

@manstis
Copy link
Member Author

manstis commented Nov 20, 2019

Jenkins please execute full downstream build.

@@ -248,10 +249,6 @@ private OutputClauseColumn makeOutputClauseColumn(final int index,
return column;
}

private GridRow makeDecisionTableRow() {
return new LiteralExpressionGridRow(getExpressionTextLineHeight(getRenderer().getTheme()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I would prefer to keep this factory method (even with a simple new statement) so it will be easier to change in the future. Btw no strong opinion

@manstis manstis merged commit 87db662 into kiegroup:master Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants