Bug 735810 - performance shrinkage of Paths tool
Use a GQueue instead of a GList in GimpCanvasGroup, so adding items takes constant time instead of O(n). Also, removing items was traversing the list twice. This should generally speed up tools with lots of canvas items. Also, add a private pointer to the instance struct instead of using a GET_PRIVATE() macro.
This commit is contained in:
@ -33,11 +33,15 @@
|
||||
#define GIMP_CANVAS_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_CANVAS_GROUP, GimpCanvasGroupClass))
|
||||
|
||||
|
||||
typedef struct _GimpCanvasGroupClass GimpCanvasGroupClass;
|
||||
typedef struct _GimpCanvasGroupPrivate GimpCanvasGroupPrivate;
|
||||
typedef struct _GimpCanvasGroupClass GimpCanvasGroupClass;
|
||||
|
||||
struct _GimpCanvasGroup
|
||||
{
|
||||
GimpCanvasItem parent_instance;
|
||||
GimpCanvasItem parent_instance;
|
||||
|
||||
GimpCanvasGroupPrivate *priv;
|
||||
|
||||
};
|
||||
|
||||
struct _GimpCanvasGroupClass
|
||||
|
Reference in New Issue
Block a user