Modify

Opened 10 years ago

Closed 10 years ago

#11663 closed enhancement (needinfo)

[patch] color properties

Reported by: shinigami Owned by: shinigami
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

ColorProperty.getColorName xlates color names again and again... added cache of xlated names + precompiled pattern.

Attachments (1)

color_property.patch (1.7 KB ) - added by shinigami 10 years ago.

Download all attachments as: .zip

Change History (6)

by shinigami, 10 years ago

Attachment: color_property.patch added

comment:1 by wiktorn, 10 years ago

Few remarks for this patch:

  • please use ConcurrentHashMap instead of HashMap
  • as this is not critical information, nor that expensive to compute, we can drop synchronized at all. We risk only that the same value will be computed more than once, but once all is computed, we will use happy path without monitor locks.

Did you ran your changes through some benchmarks? What is the gain for typical user?

comment:2 by Don-vip, 10 years ago

Summary: color properties[patch] color properties

what does "xlated" mean?

comment:3 by windu.2b, 10 years ago

In your patch, the line 56 should use the "colName.toLowerCase()" method, shouldn't ?

in reply to:  2 comment:4 by simon04, 10 years ago

Owner: changed from team to shinigami
Status: newneedinfo

Replying to Don-vip:

what does "xlated" mean?

Maybe "translated"?

comment:5 by simon04, 10 years ago

Resolution: needinfo
Status: needinfoclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain shinigami.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.