harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Stolyarov" <igorvstolya...@gmail.com>
Subject Re: AWT 2D PERFORMANCE ISSUE
Date Fri, 28 Jul 2006 11:00:44 GMT
Thank you! I'll learn this topic in detail.

Regards,
Igor


On 7/28/06, Ivanov, Alexey A <alexey.a.ivanov@intel.com> wrote:
>
>
> >-----Original Message-----
> >From: Igor Stolyarov [mailto:igorvstolyarov@gmail.com]
> >Sent: Friday, July 28, 2006 1:04 PM
> >To: harmony-dev@incubator.apache.org
> >Subject: Re: AWT 2D PERFORMANCE ISSUE
> >
> >I think using WeakReference and ReferenceQueue can't help because
> according
> >to RI I have to give customer array
>
> You give the customer that array, and store a Weak- or PhantomReference
> in your object. When you need to update some data, you can check if the
> array you gave is still "alive" or not.
>
> I dealt with this kind of problem in javax.swing.text.GapContent. Its
> createPosition() method should return an object to client. This object
> returned must be updated when data (text) stored in GapContent is
> modified. To reduce the number of Position objects to be updated, I used
> PhantomReferences to be notified that the object I returned to client
> was cleared by garbage collector.
>
> Has anyone else dealt with reference APIs and similar problems?
>
>
> Regards,
> Alexey.
>
> >
> >On 7/28/06, Ivanov, Alexey A <alexey.a.ivanov@intel.com> wrote:
> >>
> >> >-----Original Message-----
> >> >From: Igor Stolyarov [mailto:igorvstolyarov@gmail.com]
> >> >Sent: Friday, July 28, 2006 9:25 AM
> >> >To: harmony-dev@incubator.apache.org
> >> >Subject: Re: AWT 2D PERFORMANCE ISSUE
> >> >
> >> >I'm sorry. May be I don't clear explained my question. Main target
> of
> >> my
> >> >question was discussion of synchronization of two arrays one of
> these
> >> is
> >> >java array, second is native array. Main issue of this
> synchronization
> >> is
> >> >the fact that customer can recieve reference to the java array and
> we
> >> don't
> >> >know when customer will release the array.
> >>
> >> What about using Weak- or PhantomReferences and ReferenceQueue? They
> may
> >> solve your problem.
> >>
> >> Regards,
> >> --
> >> Alexey A. Ivanov
> >> Intel Middleware Product Division
> >>
> >> <SNIP>
> >>
> >> ---------------------------------------------------------------------
> >> Terms of use : http://incubator.apache.org/harmony/mailing.html
> >> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> >> For additional commands, e-mail:
> harmony-dev-help@incubator.apache.org
> >>
> >>
> >
> >
> >--
> >Igor V. Stolyarov
> >Intel Middleware Products Division
>
> --
> Alexey A. Ivanov
> Intel Middleware Product Division
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Igor V. Stolyarov
Intel Middleware Products Division

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message