Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Caching wrapped objects in custom WrapFactory

1 view
Skip to first unread message

Daryl Stultz

unread,
Dec 31, 2009, 11:15:52 AM12/31/09
to Rhino JS User List
In implementing a WrapFactory I noticed that objects were being wrapped
multiple times (probably every time accessed). This thread:

http://www.mail-archive.com/dev-tech-js-...@lists.mozilla.org/msg00468.html

is a discussion of caching the wrapped objects. It uses terms like "weak
reference" which scares me, I'm likely to produce a memory issue. I'm
wondering if it would help performance or if the reflection lookup work is
already being cached. IOW, is caching at the WrapFactory worth the
performance improvement, if any?

Thanks.

--
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da...@6degrees.com

0 new messages