~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to scripts/python-console

  • Committer: drtomc
  • Date: 2008-03-04 04:54:09 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:641
console: slightly more aggressive output buffering - wait till we've at least
    128 bytes of output. Leads to much better perception of performance by
    significantly reducing the network overheads.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
        self.remainder = ''
57
57
 
58
58
    def write(self, stuff):
 
59
        # if there's less than 1K, buffer
 
60
        if len(self.remainder) + len(stuff) < 128:
 
61
            self.remainder = self.remainder + stuff
 
62
            return
 
63
 
59
64
        # Split the content up into lines, and ship all the completed
60
65
        # lines off to the server.
61
66
        lines = stuff.split("\n")