Re: Object creation overhead
From: Richard (richard_at_praxistech.com)
Date: 11/27/03
- Next message: nos: "Re: Object creation overhead"
- Previous message: Anthony Borla: "Re: Object creation overhead"
- In reply to: Anthony Borla: "Re: Object creation overhead"
- Next in thread: Anthony Borla: "Re: Object creation overhead"
- Reply: Anthony Borla: "Re: Object creation overhead"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 27 Nov 2003 00:03:32 GMT
Anthony Borla wrote:
>
> General approaches:
>
> * Reduce the size of each object
>
> - Use 'proxy' objects to represent each 'real' object.
> When the proxy is selected, the 'real' object is
> instantiated from data stored elsewhere [e.g. in
> a database, file, or cache]
Probably will have to do this, but I have not finalized an approach...
>
> - Minimise the number of fields in each object. For
> example, instead of using separate 'String' objects
> to store data such as 'subject', 'from', etc, just use a
> single 'StringBuffer' to hold *all* this data, and
> extract it from the 'StringBuffer' via accessors.
> The 'StringBufferReader/Writer' classes could help
> here
>
> - Use alternate means to represent object data. For
> example, instead of pbjects like 'String', encode data
> in 'int' primitives and decode using bitwise operations
> via accessors
How about using a primitive like char or char[]?
My main concern was the overhead of the String class, not much for a couple
of thousand Strings, but now I am dealing with upwards of 100,000...
The end result is that this ArrayList is used in a TableModel. Looks like I
have a lot of re-writing to do that I didn't want. Oh well, at least it
will perform better...
Thank you for your help!
Rich
- Next message: nos: "Re: Object creation overhead"
- Previous message: Anthony Borla: "Re: Object creation overhead"
- In reply to: Anthony Borla: "Re: Object creation overhead"
- Next in thread: Anthony Borla: "Re: Object creation overhead"
- Reply: Anthony Borla: "Re: Object creation overhead"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|