~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/server.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-01 07:56:03 UTC
  • mfrom: (3224.5.40 faster-startup)
  • Revision ID: pqm@pqm.ubuntu.com-20081001075603-s9nynw8y85fmrprj
Reduce startup time by a small amount. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    trace,
28
28
    transport,
29
29
)
30
 
from bzrlib.smart.medium import SmartServerSocketStreamMedium
 
30
from bzrlib.lazy_import import lazy_import
 
31
lazy_import(globals(), """
 
32
from bzrlib.smart import medium
 
33
""")
31
34
 
32
35
 
33
36
class SmartTCPServer(object):
152
155
        # propogates to the newly accepted socket.
153
156
        conn.setblocking(True)
154
157
        conn.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
155
 
        handler = SmartServerSocketStreamMedium(
 
158
        handler = medium.SmartServerSocketStreamMedium(
156
159
            conn, self.backing_transport, self.root_client_path)
157
160
        thread_name = 'smart-server-child' + thread_name_suffix
158
161
        connection_thread = threading.Thread(