From fe1e2f16ff61ceaaca65f52590a5d5a4b132d790 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 15 Mar 2011 13:05:33 +1300 Subject: Improve responsiveness of request and response viewing. - Computing the view of a large body is expensive, so we introduce an LRU cache to hold the latest 20 results. - Use ListView more correctly, passing it individual urwid.Text snippets, rather than a single large one. This hugely improves render time. --- libmproxy/proxy.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libmproxy/proxy.py') diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 5ec167d6..80040a03 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -303,6 +303,9 @@ class Response(controller.Msg): del i["expires"] return c.output(header="").strip() + def __hash__(self): + return id(self) + def refresh(self, now=None): """ This fairly complex and heuristic function refreshes a server -- cgit v1.2.3