Module: check_mk
Branch: master
Commit: 81415ac849f22732f6c4c9df19f0a673af753f9c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=81415ac849f227…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Dec 6 14:23:27 2017 +0100
5452 FIX Highly improved performance of rendering large tables of HW/SW inventory trees
This may also concern other pages or views.
Change-Id: Iefad8e06d8c763e805e946a5e6ba76c030bb98ca
---
.werks/5452 | 10 ++++++++++
web/htdocs/htmllib.py | 12 ++++++------
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/.werks/5452 b/.werks/5452
new file mode 100644
index 0000000..8ebcba7
--- /dev/null
+++ b/.werks/5452
@@ -0,0 +1,10 @@
+Title: Highly improved performance of rendering large tables of HW/SW inventory trees
+Level: 1
+Component: multisite
+Compatible: compat
+Edition: cre
+Version: 1.5.0i2
+Date: 1512566453
+Class: fix
+
+This may also concern other pages or views.
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 65bcfdb..c11a0b9 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -437,7 +437,7 @@ class OutputFunnel(object):
raise MKGeneralException(_('Type Error: html.write accepts str and
unicode input objects only!'))
if self.is_plugged():
- self.plug_text[self.plug_level] += text
+ self.plug_text[self.plug_level].append(text)
else:
# encode when really writing out the data. Not when writing plugged,
# because the plugged code will be handled somehow by our code. We
@@ -465,7 +465,7 @@ class OutputFunnel(object):
# Put in a plug which stops the text stream and redirects it to a sink.
def plug(self):
- self.plug_text.append('')
+ self.plug_text.append([])
self.plug_level += 1
@@ -478,8 +478,8 @@ class OutputFunnel(object):
if not self.is_plugged():
return None
- text = self.plug_text[self.plug_level]
- self.plug_text[self.plug_level] = ""
+ text = "".join(self.plug_text[self.plug_level])
+ self.plug_text[self.plug_level] = []
self.plug_level -= 1
self.write(text)
self.plug_level += 1
@@ -490,8 +490,8 @@ class OutputFunnel(object):
if not self.is_plugged():
return ''
- text = self.plug_text[self.plug_level]
- self.plug_text[self.plug_level] = ''
+ text = "".join(self.plug_text[self.plug_level])
+ self.plug_text[self.plug_level] = []
return text