#6027: [with patch; needs work] get_memory_usage() sucks performance wise on OSX
----------------------+-----------------------------------------------------
 Reporter:  mabshoff  |       Owner:  mabshoff
     Type:  defect    |      Status:  new     
 Priority:  critical  |   Milestone:  sage-4.0
Component:  porting   |    Keywords:          
----------------------+-----------------------------------------------------
Changes (by rdingman):

 * cc: rdingman (added)


Comment:

 I've added a patch to get the memory usage of Sage on Darwin without
 spawning top and parsing the output. With this patch, get_memory_usage()
 will still report the same result that top reports for VSIZE (the link
 above doesn't do this).

 Before patch:

 sage: timeit('get_memory_usage()')
 5 loops, best of 3: 156 ms per loop

 After patch:

 sage: timeit('get_memory_usage()')
 125 loops, best of 3: 2.62 ms per loop

 This has only been tested on OS X 10.5, Intel, 64-bit. It will likely work
 for PPC and 32-bit (still 10.5), but I'm not sure about 10.4 and earlier.
 I don't have access to hardware right now to test (and fix) this patch on
 all these other configurations. I'd be happy to finish up this patch if
 someone has machines to test on.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6027#comment:1>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to