Re: Cache or memory pools in java



Dlugi wrote:

I know this standard (JCache) but that implementation take 1 second per 1MB when evaluate how many size entries occupy in the memory :/

Hmm, maybe instrumentation could help?

Simple example on how to compute approximated object size is there:
http://tinyurl.com/hfzzu
(notice the correction from a post next to it)

Accuracy of that method is much better than with serialization, and efficiency is not so bad I think.

For example, on my machine ArrayList filled with 1000000 new Objects consumes about 14MB of memory, and computation of its size takes about 1.5 sec.


piotr
.



Relevant Pages

  • Re: Naval Railgun: Barrel Design or Power Supply?
    ... >> your effective munitions these days is guided or self guiding.. ... > You need sensors with no moving parts and we aren't there yet. ... selenium-based light-sensitive detectors is the electrons. ... what the bullet can do with this information is ...
    (sci.physics)
  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Re: python 3 constant
    ... is require Python to change to accommodate your need. ... Can you see the slight difference? ... Best regards, ...
    (comp.lang.python)
  • Re: The Sci-Fi Rejection Letter That Time Forgot
    ... nations have stockpiled arsenals of these incredible bombs and the time the story is set. ...
    (rec.arts.sf.written)
  • Re: Wachstumssaison Flieder
    ... Handbreit über dem Boden. ... "Fliederkrimi" am Samstag halten heute meine Nerven nicht aus. ... Dorothee ...
    (de.rec.garten)