• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Faking asynchronous component rendering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Faking asynchronous component rendering


  • Subject: Re: Faking asynchronous component rendering
  • From: Hugi Thordarson <email@hidden>
  • Date: Sat, 07 Jan 2017 00:01:09 +0000

Hi Samuel,

that’s an excellent idea where I have ERXKeys, but usually these are just regular methods on a component class and I’d rather not create additional ERXKeys for properties that should be calculated asynchronously.

Here’s an alternative approach: Just annotate the methods that should be executed concurrently:

https://gist.github.com/hugith/8e00706e5d6d185211e39c1854dc1856

I’m getting huge performance improvements in my components using this simple approach.

Cheers,
- hugi


> On 6. jan. 2017, at 20:28, Samuel Pelletier <email@hidden> wrote:
>
> Hi Hugi,
>
> Supplier is typed, if you replace the key name by types ERXKey and replace the bindAsyncField signature, this may works to detect type error between Supplier and and key path.
>
> private void bindAsyncField( ERXKey<T> key, Supplier<T> supplier ) {
> }
>
> Not perfect but may be enough for you.
>
> Regards,
>
> Samuel
>
>> Le 6 janv. 2017 à 13:19, Hugi Thordarson <email@hidden> a écrit :
>>
>> Hi all,
>> I’ve been speeding up some of my slower/more data-heavy components by making them load their data asynchronously before rendering, using something similar to this:
>>
>> https://gist.github.com/hugith/14f9a77d4b7d270dd6003084fdea7fb8
>>
>> It *works* but is obviously somewhat cumbersome and has shortcomings (lack of type safety and compile-time safety for variable names being two).
>>
>> Just wanted to check if anyone is doing something awesome in this regard, or has better ideas about how to make the component data loading/rendering process more asynchronous?
>>
>> Cheers,
>> - hugi
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Faking asynchronous component rendering (From: Hugi Thordarson <email@hidden>)

  • Prev by Date: Faking asynchronous component rendering
  • Next by Date: controlling migrations
  • Previous by thread: Faking asynchronous component rendering
  • Next by thread: controlling migrations
  • Index(es):
    • Date
    • Thread