wukan, on 2011-02-14 23:39, wrote: > Hi ,When I use matplotlib to draw 2D graphics in django web site,I encounter > a problem. > when server users use matplotlib to draw graphics simultaneously will > cause website collapse. > when one user use matplotlib to draw graphics will have no problem.
Is there an error / stack trace generated? Can you give an example of how you are using matplotlib from django? I can imagine there being some issue if you are using the pyplot interface to deal with all user requests (e.g. plt.plot, instead of allocating an axes object for each user and calling ax.plot). There's no way for us to know unless you provide more details. > i suppose matplotlib doesnot support multithreading drawing. > so i put the draw function in a thread . it can't work as before. I don't follow. > so why matplotlib doesnot support multithreading drawing? > How to solve this problem. Depending on the load, the nature of desired plots, and the need for user intervention, you might be able to get around the issues you're having just by spawning a new process to do the plotting. P.S. I try to answer all of the questions I feel capable of answering on the mailing list, there is no need to send duplicates of mailing list questions directly to me. best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users