Opened 8 years ago

Last modified 6 years ago

#704 assigned optimization

improve performance of GC handling

Reported by: westram Owned by: westram
Priority: normal Milestone:
Component: Library (GUI) Version: SVN
Keywords: Cc:

Description (last modified by westram)

Using many GCs has critical performance issues:

  • memory:
    • uses ~ 5.4 kb per color
      ⇒ using 64k-colors wastes ~ 350 Mb
      • ~ 250 Mb used by ARB (~ 3.8 kb per color)
      • ~ 100 Mb used by X server (memory is shared between multiple instances of ARB)
    • details in spreadsheet
  • runtime:
    • slows down startup (initialization of GCs)
    • slows down tree-refresh (because all GCs are reset to default before show)

Todo:

  • check why AW_common::reset_style is used/needed (getting rid of it would be superb).
  • AW_GC stores much data about font dimensions
    • this information is font/size-specific
      • ⇒ should not be stored in directly GC
      • instead GC should only reference this data
    • witdh, ascent + descent tables alone use ~ 1.5 kb (which is ~40% of memory problem)
  • Each canvas has its own AW_gc_manager, but for several canvases these are completely identical (e.g. for multiple tree- or genome-displays). Currently these managers synchronize by using the same awars. They could share alls GCs etc.

Attachments (1)

memuse_GC_alloc.ods (14.8 KB) - added by westram 8 years ago.

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by westram

comment:1 Changed 8 years ago by westram

  • Description modified (diff)
  • Status changed from new to accepted

comment:2 Changed 8 years ago by westram

  • Description modified (diff)

comment:3 Changed 8 years ago by westram

  • Description modified (diff)

comment:4 Changed 8 years ago by epruesse

How much does it cost in motif to change the color of a GC? (In GTK, its nothing but a variable assignment)

comment:5 Changed 8 years ago by westram

  • Description modified (diff)

comment:6 Changed 7 years ago by westram

  • Description modified (diff)

comment:7 Changed 6 years ago by westram

  • Status changed from accepted to assigned
Note: See TracTickets for help on using tickets.