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
Decrease memory footprint for AbstractTreeNode #522
base: releases/23.2
Are you sure you want to change the base?
Conversation
4e90f1b
to
c7ffc70
Compare
Remove extension and contributions Lazy create child nodes
Remove extension and contributions Lazy create child nodes
Remove extension and contributions Lazy create child nodes
c7ffc70
to
c709389
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the notes. Currently, the change removes features from page extensions, instead of just removing extension support from tree nodes.
if (callInitializer) { | ||
callInitializer(); | ||
} | ||
} | ||
|
||
protected void callInitializer() { | ||
if (!isInitialized()) { | ||
interceptInitConfig(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initConfig
of a TreeNode is not invoked anymore. I think it is better to create a new non-final method initConfigInternal
that is just invoking initConfig()
. AbstractPage
should override initConfigInternal
and invoke AbstractPage.interceptInitConfig()
. Remove overridden method AbstractPage.callInitializer()
.
The pattern with initConfigInternal
is already used by AbstractWidget
.
catch (Exception t) { | ||
LOG.error("node {} {}", getClass(), getCell().getText(), t); | ||
} | ||
execDecorateCell(m_cell); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the exception-handling? It is not related to extensibility.
@@ -699,8 +621,6 @@ public List<IMenu> getMenus() { | |||
|
|||
protected List<IMenu> lazyCreateAndInitializeMenus() { | |||
List<Class<? extends IMenu>> declaredMenus = getDeclaredMenus(); | |||
List<IMenu> contributedMenus = m_contributionHolder.getContributionsByClass(IMenu.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Menu contributions do not work anymore on pages as well. I think this is not intended. Create a new contributeMenusInteral
method that returns an empty list on AbstractTreeNode
, but that uses the contributionHolder
on AbstractPage
.
catch (RuntimeException e) { | ||
LOG.warn("Exception while disposing node.", e); | ||
} | ||
disposeInternal(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you remove the outer try block by intention? If disposeInternal
throws an Error, the disposing flag is not restored anymore.
} | ||
|
||
@Override | ||
public void execDecorateCell(TreeNodeDecorateCellChain chain, Cell cell) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This three extension methods are currently not available on a PageExtension. I thing they should be pushed down.
Remove extension and contributions
Lazy create child nodes
287775