Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python
Which uses less memory?
 

Index | Next | Previous | View Flat


bret.wortman at gmail

Nov 15, 2007, 9:46 AM


Views: 44
Permalink
Which uses less memory?

I'm not sure if this is as easy a question as I'd like it to be, but
here goes....

I'm working on an application that is very memory intensive, so we're
trying to reduce the memory footprint of classes wherever possible. I
have a need for a class which is able to have a type identifier which
can be examined at run-time to determine whether that class (called
Domain) contains data I care about or not.

I've thought of two ways to implement this:

1. Add a type attribute and set it to a descriptive string.
2. Create marker classes and use multiple inheritance to "attach"
these markers to specific Domains.

Here's the kicker: I need to serialize these Domains and send them to/
from Java code as well as work on them using Python. We're looking to
use Hessian and pyactivemq to handle the Java/Python interfaces.
Which, I guess, leads to the following group of questions:

1. Which method has the smaller footprint within the Python engine?
2. Do these protocols (Hessian and Stomp) preserve the class
information when the class is serialized?

Any input would be most welcome. Thanks!


Bret Wortman
--
http://mail.python.org/mailman/listinfo/python-list

Subject User Time
Which uses less memory? bret.wortman at gmail Nov 15, 2007, 9:46 AM
    Re: Which uses less memory? nick at craig-wood Nov 17, 2007, 2:30 PM
        Re: Which uses less memory? gagsl-py2 at yahoo Nov 18, 2007, 9:20 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.