Skip to content

Commit

Permalink
reduce imports at module load time: import window source when needed …
Browse files Browse the repository at this point in the history
…instead

git-svn-id: https://xpra.org/svn/Xpra/trunk@18578 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 24, 2018
1 parent 59682cf commit fecbcd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xpra/server/source/windows_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
bandwidthlog = Logger("bandwidth")

from xpra.server.mixins.stub_server_mixin import StubServerMixin
from xpra.server.window.window_video_source import WindowVideoSource
from xpra.server.window.metadata import make_window_metadata
from xpra.simple_stats import get_list_stats
from xpra.net.compression import Compressed
from xpra.os_util import monotonic_time, BytesIOClass, strtobytes
from xpra.util import typedict, envint, envbool, DEFAULT_METADATA_SUPPORTED, XPRA_BANDWIDTH_NOTIFICATION_ID
Expand Down Expand Up @@ -165,6 +163,7 @@ def get_window_info(self, window_ids=[]):
"""
Adds encoding and window specific information
"""
from xpra.simple_stats import get_list_stats
pqpixels = [x[2] for x in tuple(self.packet_queue)]
pqpi = get_list_stats(pqpixels)
if len(pqpixels)>0:
Expand Down Expand Up @@ -485,6 +484,7 @@ def make_window_source(self, wid, window):
bandwidth_limit = self.bandwidth_limit
if self.mmap_size>0:
bandwidth_limit = 0
from xpra.server.window.window_video_source import WindowVideoSource
ws = WindowVideoSource(
self.idle_add, self.timeout_add, self.source_remove,
ww, wh,
Expand Down

0 comments on commit fecbcd0

Please sign in to comment.