Skip to main content



      Home
Home » Modeling » Graphiti » SWT Font management in Graphiti
SWT Font management in Graphiti [message #1693755] Tue, 28 April 2015 03:34 Go to next message
Eclipse UserFriend
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 03:36] by Moderator

Re: SWT Font management in Graphiti [message #1693790 is a reply to message #1693755] Tue, 28 April 2015 07:31 Go to previous messageGo to next message
Eclipse UserFriend
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 07:58 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 23:53:58 EDT 2025

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

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

Back to the top