its a curl command caliing a http function. for example:
curl <username>:<password> <xml> GET http://<somelink>/app/somefunction so i have to use this to create a wrapper which can scale better . While i use the subprocess it taking some time which i feel as bit slow. so here are the questions again: 1) what are the different ways to run the above statement in a effective way ? 2) How to improve the performance if any? Thanks, santosh On Fri, Jul 18, 2014 at 12:45 AM, Danny Yoo <d...@hashcollision.org> wrote: > On Thu, Jul 17, 2014 at 11:35 AM, Santosh Kumar <rhce....@gmail.com> > wrote: > > > I am currently working on a project , which has lots of curl commands. I > am > > using subprocess.Popen to run these curl commands. But somehow i see its > bit > > slow. > > Is there a way/module by which i can improve the performance of the > program. > > > If the use of curl really is responsible and worthwhile to optimize, > then you might consider using pycurl if you really need the full > features of curl. > > http://pycurl.sourceforge.net/ > > But can you say more what you're doing with curl? More information > may let us give better advice. The core lesson of > http://www.cs.bell-labs.com/cm/cs/pearls/cto.html is always in my > mind: we may not actually know the right question yet, so we must be > careful about our answers, lest we mislead. > > I don't think we really understand the problem yet, so tell us more if you > can. > > I would also recommend profiling if you haven't done so already. > You've pointed out that something is slow, but unless you've actually > measured what's really responsible, anything could be contributing. > It may be, for example, that you're being limited by your network > throughput, in which case trying to make your program go faster will > not be effective. You really must measure: otherwise, it's guesswork > and crossed fingers. > > See: https://docs.python.org/2/library/profile.html for documentation > on Python profiling. > -- D. Santosh Kumar RHCE | SCSA +91-9703206361 Every task has a unpleasant side .. But you must focus on the end result you are producing.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor