Changeset a387d12e for owl.h


Ignore:
Timestamp:
Mar 27, 2007, 10:04:10 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
61abb18
Parents:
702aee7
git-author:
Nelson Elhage <nelhage@mit.edu> (03/27/07 22:04:03)
git-committer:
Nelson Elhage <nelhage@mit.edu> (03/27/07 22:04:10)
Message:
Implementing an LRU cache of the message list fmtexts. This reduces
memory usage by roughly 1MB/kilo-zephyrs in steady state.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.h

    rd08162a ra387d12e  
    249249typedef struct _owl_fmtext {
    250250  int textlen;
     251  int bufflen;
    251252  char *textbuff;
    252253  char *fmbuff;
     
    329330} owl_pair;
    330331
     332struct _owl_fmtext_cache;
     333
    331334typedef struct _owl_message {
    332335  int id;
     
    335338  ZNotice_t notice;
    336339#endif
    337   owl_fmtext fmtext;              /* this is now only a CACHED copy */
    338   int invalid_format;             /* indicates whether fmtext needs to be regenerated */
     340  struct _owl_fmtext_cache * fmtext;
    339341  int delete;
    340342  char *hostname;
     
    344346  char *zwriteline;
    345347} owl_message;
     348
     349#define OWL_FMTEXT_CACHE_SIZE 1000
     350/* We cache the saved fmtexts for the last bunch of messages we
     351   rendered */
     352typedef struct _owl_fmtext_cache {
     353    owl_message * message;
     354    owl_fmtext fmtext;
     355} owl_fmtext_cache;
    346356
    347357typedef struct _owl_style {
Note: See TracChangeset for help on using the changeset viewer.