Changeset 7de07a0 for irc.h


Ignore:
Timestamp:
2018-07-12T08:42:45Z (6 years ago)
Author:
dequis <dx@…>
Parents:
b9d1fdc
git-author:
dequis <dx@…> (12-07-18 08:30:59)
git-committer:
dequis <dx@…> (12-07-18 08:42:45)
Message:

Use GString for irc->sendbuffer (simpler and faster)

The old code managed growing the buffer manually and called strlen()
very often. GString has a length field and the logic to grow the buffer
is none of our business. Probably smarter, too.

This takes a "blist all" of 14k users from 8.2 to 1.3 seconds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.h

    rb9d1fdc r7de07a0  
    8585        double last_pong;
    8686        int pinging;
    87         char *sendbuffer;
     87        GString *sendbuffer;
    8888        char *readbuffer;
    8989        GIConv iconv, oconv;
Note: See TracChangeset for help on using the changeset viewer.