I am interested in using Matplotlib for real-time updating plot applications. My concern is with system load issues (they’re pretty high). Using the code below, which came off of an earlier posting to this list, on a pc (2.4 gig processor) memory usage ranges from 20 - 50+ megs (there’s a cycling pattern) and 30-40% of the cpu is being used for this basic app. If left to run for 20 minutes or so, it seems to crash (entire screen turns grey and reboot is required to get machine back to working order).
On a solaris machine, the performance numbers are similar, though the memory didn’t appear to exceed 30 megs (or cycle). One other solaris issue is that the plot doesn’t update, unless it is forced to redraw (by moving another window over the plot window). I’ve tinkered with the redraw rate, but it didn’t seem to help.
Short of the performance issues, this software looks great. Is there a way of using the software that will minimize system impact, or better yet, can this become a development priority? It’s not clear if the performance issue is driven by matplotlib, pygtk or gtk. Is it possible that different backends lead to non-trivial differences in performance?
Also, the crashing on a pc and non-updating on solaris are outstanding concerns.
from matplotlib.matlab import *
“Simulate a function that returns system memory”
“Simulate a function that returns cpu usage”
“Simulate a function that returns network bandwidth”
return get_memory(), get_cpu(), get_net()
fig = figure(1)
ax = subplot(111)
ind = arange(1,4)
pm, pc, pn = bar(ind, get_stats())
centers = ind + 0.5*pm.get_width()
ax.set_xticklabels([‘Memory’, ‘CPU’, ‘Bandwidth’])
m,c,n = get_stats()