diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-03-15 13:05:33 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-03-15 13:05:33 +1300 |
commit | fe1e2f16ff61ceaaca65f52590a5d5a4b132d790 (patch) | |
tree | 54c537fbc56cfe4ed1e1b87f927e4d0ea7adeb05 /libmproxy/proxy.py | |
parent | 563d4161f120083eac79bf67cdddf28f9e9134c2 (diff) | |
download | mitmproxy-fe1e2f16ff61ceaaca65f52590a5d5a4b132d790.tar.gz mitmproxy-fe1e2f16ff61ceaaca65f52590a5d5a4b132d790.tar.bz2 mitmproxy-fe1e2f16ff61ceaaca65f52590a5d5a4b132d790.zip |
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.
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r-- | libmproxy/proxy.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 |