Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » SWT Font management in Graphiti
SWT Font management in Graphiti [message #1693755] Tue, 28 April 2015 07:34 Go to next message
Jerome S. is currently offline Jerome S.Friend
Messages: 9
Registered: March 2015
Junior Member
Dear Michael,

I am trying to stress-test programmatically my Graphiti application and I have found something that does not seem optimal in the SWT Font management. Indeed if you create a huge number of Text(s) with the exact same Font properties, it creates one instance of "org.eclipse.swt.graphics.Font" for every instance of Text, even if two Text(s) use the exact same SWT Font! [See PictogramElementDelegate#refreshFont(AbstractText text, Figure label)]

This might be a problem because concretely I need to create at least 5 Text shapes for every "object" I draw in my Graphiti editor and I can't have more than 15xx objects on the screen due to Windows "GDI Objects" limit of 10 000 per process. If I try to create 15xx * 5 Text shapes I reach the "no more handles" limit in SWT.

I think a solution would be to store the SWT Fonts in a FontRegistry instead of creating one Font per Text.

Regards,
Jérôme

[Updated on: Tue, 28 April 2015 07:36]

Report message to a moderator

Re: SWT Font management in Graphiti [message #1693790 is a reply to message #1693755] Tue, 28 April 2015 11:31 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Jerome,

thanks for this feedback, that sounds like a good point. Would you please
file that as an enhancement bugzilla for Graphiti?

Thanks,
Michael
Re: SWT Font management in Graphiti [message #1693802 is a reply to message #1693790] Tue, 28 April 2015 11:58 Go to previous message
Jerome S. is currently offline Jerome S.Friend
Messages: 9
Registered: March 2015
Junior Member
Here is the enhancement: https://bugs.eclipse.org/bugs/show_bug.cgi?id=465675

Regards,
Jérôme
Previous Topic:Single-Click-Feature
Next Topic:Graph Editor
Goto Forum:
  


Current Time: Thu Apr 25 22:02:30 GMT 2024

Powered by FUDForum. Page generated in 0.03348 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top