You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Ronny Shibley <rs...@codefish.com> on 2014/04/02 13:04:47 UTC

Re: Spark Datagrid with Multiple Columns

Hello Again,

I tried using Flex List ItemRenderer but with all those columns it took
some time to render initially around 5 seconds with Flash Hangin... Not
very pleasant.

Anyhow, after doing a lot of digging and stumbling upon the following
website
http://zoltanb.co.uk/flex-performance-tuning-superfast-list-component
I've decided to go another direction. Manually draw the Grid on a Bitmap
Canvas. As i mentioned before, all the functionality provided by a typical
grid was not required in my case... so it was pretty simple and worked like
a charm.

I added some frustum culling to enhance performance... Basically just
drawing the visible area of my screen. I posted my project on Git, you may
view the *Example *and find all the info on following page.

http://codefishsource.github.io/FlexBitmapGrid/

Many thanks for all your help.





Kind Regards,


 Ronny Shibley, Eng



Software Architect | Codefish | www.codefish.com

t +961 5 450824 | m +961 70 250650




On Wed, Mar 26, 2014 at 4:58 PM, Lee Burrows
<su...@leeburrows.com>wrote:

> I expect you would see a large performance boost if you used a list -
> you'd only have one renderer per row instead of 100+
>
> On 26/03/2014 14:54, Ronny Shibley wrote:
>
>> Hello Flex User,
>>
>> I have a spark DataGrid with 100+ columns with 100+ Rows.
>>
>> My Item Renderers are as lean as they can get but i still have small
>> hiccups while scrolling vertically and horizontally. I have also used all
>> the obvious performance improvements: variableRowHeight="false",
>> opaqueBackground, etc...
>>
>> Basically I have come to the following conclusion:
>>
>> I don't want to recycle my ItemRenders I would rather wait couple of
>> seconds.
>>
>> My Question is the following:
>>
>> 1- Is there a special way to Draw the whole Grid with all the
>> ItemRenderers
>> at once, Basically useVirtualLayout=false ?
>>
>> 2- Would it be more performant to use a s:List instead as i don't need the
>> functionalities of a Grid ?
>>
>>
>> Kind Regards,
>>
>>
>> Ronny Shibley, Eng
>>
>>
>>
>> Software Architect | Codefish | www.codefish.com
>>
>> t +961 5 450824 | m +961 70 250650
>>
>>
>
> --
> Lee Burrows
> ActionScripter
>
>

Re: Spark Datagrid with Multiple Columns

Posted by Tom Chiverton <tc...@extravision.com>.
On 03/04/14 10:46, Ronny Shibley wrote:
>   my argument
> was that there is nothing that can be done on flex... And by creating that
> bitmapgrid i just proved me right:)
Win !

Tom

Re: Spark Datagrid with Multiple Columns

Posted by Ronny Shibley <rs...@codefish.com>.
What you are saying makes a lot of sense, but sometimes its just easier
giving the client what they want than trying to explain why this is not
recommended on flex... When we decided to use flex at start... my argument
was that there is nothing that can be done on flex... And by creating that
bitmapgrid i just proved me right :)

Kind Regards,


 Ronny Shibley, Eng



Software Architect | Codefish | www.codefish.com

t +961 5 450824 | m +961 70 250650




On Thu, Apr 3, 2014 at 12:29 PM, Tom Chiverton <tc...@extravision.com> wrote:

> On 03/04/14 09:42, Codefish wrote:
>
>> Lol good question, my first thoughts. But its a calendar displaying daily
>> availabilities over 12 months. So each cell has different color. The point
>> is to spot the empty cells and have an overview of the upcoming months...
>> Also applying instant ui filters was one of the requirements.
>>
>>  Maybe a better experience would be to be less granular further in the
> future ? If the idea is to have an overview - and tools like 'find next
> free day' may remove that need too ?
>
> Tom
>

Re: Spark Datagrid with Multiple Columns

Posted by Tom Chiverton <tc...@extravision.com>.
On 03/04/14 09:42, Codefish wrote:
> Lol good question, my first thoughts. But its a calendar displaying daily availabilities over 12 months. So each cell has different color. The point is to spot the empty cells and have an overview of the upcoming months... Also applying instant ui filters was one of the requirements.
>
Maybe a better experience would be to be less granular further in the 
future ? If the idea is to have an overview - and tools like 'find next 
free day' may remove that need too ?

Tom

Re: Spark Datagrid with Multiple Columns

Posted by Codefish <rs...@codefish.com>.
Will gladly do :)

Sent from my iPhone

> On Apr 3, 2014, at 11:58 AM, OmPrakash Muppirala <bi...@gmail.com> wrote:
> 
> There is a new MobileGrid that Maurice Amsellam added to the
> experimental_mobile project that actually extends a List component.  Maybe
> you can try using that and see if you get better performance?
> 
> Thanks,
> Om
> 
> 
>> On Thu, Apr 3, 2014 at 1:42 AM, Codefish <rs...@codefish.com> wrote:
>> 
>> Lol good question, my first thoughts. But its a calendar displaying daily
>> availabilities over 12 months. So each cell has different color. The point
>> is to spot the empty cells and have an overview of the upcoming months...
>> Also applying instant ui filters was one of the requirements.
>> 
>> Fyi: scrolling performance starts degrading at 20+ columns.
>> 
>> Sent from my iPhone
>> 
>>>> On Apr 3, 2014, at 10:51 AM, Tom Chiverton <tc...@extravision.com> wrote:
>>>> 
>>>> On 02/04/14 17:53, Ronny Shibley wrote:
>>>> Yes a very specific reason, the scrolling starts lagging once you have
>> 500
>>>> columns with 100 rows
>>> Will your users really be able to find the thing they want amongst
>> 49,999 other ones ?
>>> 
>>> Tom
>> 

Re: Spark Datagrid with Multiple Columns

Posted by OmPrakash Muppirala <bi...@gmail.com>.
There is a new MobileGrid that Maurice Amsellam added to the
experimental_mobile project that actually extends a List component.  Maybe
you can try using that and see if you get better performance?

Thanks,
Om


On Thu, Apr 3, 2014 at 1:42 AM, Codefish <rs...@codefish.com> wrote:

> Lol good question, my first thoughts. But its a calendar displaying daily
> availabilities over 12 months. So each cell has different color. The point
> is to spot the empty cells and have an overview of the upcoming months...
> Also applying instant ui filters was one of the requirements.
>
> Fyi: scrolling performance starts degrading at 20+ columns.
>
> Sent from my iPhone
>
> > On Apr 3, 2014, at 10:51 AM, Tom Chiverton <tc...@extravision.com> wrote:
> >
> >> On 02/04/14 17:53, Ronny Shibley wrote:
> >> Yes a very specific reason, the scrolling starts lagging once you have
> 500
> >> columns with 100 rows
> > Will your users really be able to find the thing they want amongst
> 49,999 other ones ?
> >
> > Tom
>

Re: Spark Datagrid with Multiple Columns

Posted by Codefish <rs...@codefish.com>.
Lol good question, my first thoughts. But its a calendar displaying daily availabilities over 12 months. So each cell has different color. The point is to spot the empty cells and have an overview of the upcoming months... Also applying instant ui filters was one of the requirements. 

Fyi: scrolling performance starts degrading at 20+ columns.

Sent from my iPhone

> On Apr 3, 2014, at 10:51 AM, Tom Chiverton <tc...@extravision.com> wrote:
> 
>> On 02/04/14 17:53, Ronny Shibley wrote:
>> Yes a very specific reason, the scrolling starts lagging once you have 500
>> columns with 100 rows
> Will your users really be able to find the thing they want amongst 49,999 other ones ?
> 
> Tom

Re: Spark Datagrid with Multiple Columns

Posted by Tom Chiverton <tc...@extravision.com>.
On 02/04/14 17:53, Ronny Shibley wrote:
> Yes a very specific reason, the scrolling starts lagging once you have 500
> columns with 100 rows
Will your users really be able to find the thing they want amongst 
49,999 other ones ?

Tom

Re: Spark Datagrid with Multiple Columns

Posted by Ronny Shibley <rs...@codefish.com>.
Yes a very specific reason, the scrolling starts lagging once you have 500
columns with 100 rows in a spark datagrid with column width 30px and column
height 30px.

Lots of item renderers... I'm not saying its not performant, because it is
and it renders pretty fast... but the scrolling is not not smooth at all...
it lags... especially on a laptop.

In my use case... I need super fast scrolling because my whole application
is based on a Calendar.

Kind Regards,


 Ronny Shibley, Eng



Software Architect | Codefish | www.codefish.com

t +961 5 450824 | m +961 70 250650




On Wed, Apr 2, 2014 at 6:08 PM, Julio Carneiro <ju...@4ctv.com> wrote:

> any specific reason for not using Datagrid, which already has a pretty
> decent multi-column support?
>
> On Apr 2, 2014, at 9:30 AM, Ronny Shibley <rs...@codefish.com> wrote:
>
> > Yes i simulated columns in my list item renderer... basically just drew
> > some cells with a fixed width....
> >
> > Kind Regards,
> >
> >
> > Ronny Shibley, Eng
> >
> >
> >
> > Software Architect | Codefish | www.codefish.com
> >
> > t +961 5 450824 | m +961 70 250650
> >
> >
> >
> >
> > On Wed, Apr 2, 2014 at 3:28 PM, Tom Chiverton <tc...@extravision.com>
> wrote:
> >
> >> On 02/04/14 13:22, Ronny Shibley wrote:
> >>
> >>> If so, yes the rows were not the issue, it's the number of columns...
> >>>
> >> I though this was with a List item renderer, so there are no columns,
> just
> >> a bunch of stuff in a HorizontalLayout ?
> >>
> >> Tom
> >>
>
> --
> Julio Carneiro
>
>
>

Re: Spark Datagrid with Multiple Columns

Posted by Julio Carneiro <ju...@4ctv.com>.
any specific reason for not using Datagrid, which already has a pretty decent multi-column support?

On Apr 2, 2014, at 9:30 AM, Ronny Shibley <rs...@codefish.com> wrote:

> Yes i simulated columns in my list item renderer... basically just drew
> some cells with a fixed width....
> 
> Kind Regards,
> 
> 
> Ronny Shibley, Eng
> 
> 
> 
> Software Architect | Codefish | www.codefish.com
> 
> t +961 5 450824 | m +961 70 250650
> 
> 
> 
> 
> On Wed, Apr 2, 2014 at 3:28 PM, Tom Chiverton <tc...@extravision.com> wrote:
> 
>> On 02/04/14 13:22, Ronny Shibley wrote:
>> 
>>> If so, yes the rows were not the issue, it's the number of columns...
>>> 
>> I though this was with a List item renderer, so there are no columns, just
>> a bunch of stuff in a HorizontalLayout ?
>> 
>> Tom
>> 

--
Julio Carneiro



Re: Spark Datagrid with Multiple Columns

Posted by Ronny Shibley <rs...@codefish.com>.
Yes i simulated columns in my list item renderer... basically just drew
some cells with a fixed width....

Kind Regards,


 Ronny Shibley, Eng



Software Architect | Codefish | www.codefish.com

t +961 5 450824 | m +961 70 250650




On Wed, Apr 2, 2014 at 3:28 PM, Tom Chiverton <tc...@extravision.com> wrote:

> On 02/04/14 13:22, Ronny Shibley wrote:
>
>> If so, yes the rows were not the issue, it's the number of columns...
>>
> I though this was with a List item renderer, so there are no columns, just
> a bunch of stuff in a HorizontalLayout ?
>
> Tom
>

Re: Spark Datagrid with Multiple Columns

Posted by Tom Chiverton <tc...@extravision.com>.
On 02/04/14 13:22, Ronny Shibley wrote:
> If so, yes the rows were not the issue, it's the number of columns...
I though this was with a List item renderer, so there are no columns, 
just a bunch of stuff in a HorizontalLayout ?

Tom

Re: Spark Datagrid with Multiple Columns

Posted by Ronny Shibley <rs...@codefish.com>.
By deferred rendering, you mean useVirtualLayout ? or am i missing
something ?

If so, yes the rows were not the issue, it's the number of columns... I did
not find a way to differ rendering the non visible columns unless i put a
DataGroup inside my List Item Renderer... and that was expensive too...

Kind Regards,


 Ronny Shibley, Eng



Software Architect | Codefish | www.codefish.com

t +961 5 450824 | m +961 70 250650




On Wed, Apr 2, 2014 at 3:13 PM, Tom Chiverton <tc...@extravision.com> wrote:

> On 02/04/14 12:04, Ronny Shibley wrote:
>
>> I tried using Flex List ItemRenderer but with all those columns it took
>> some time to render initially around 5 seconds with Flash Hangin... Not
>> very pleasant.
>>
> Are you sure deferred rendering was on ?
>
> Tom
>

Re: Spark Datagrid with Multiple Columns

Posted by Tom Chiverton <tc...@extravision.com>.
On 02/04/14 12:04, Ronny Shibley wrote:
> I tried using Flex List ItemRenderer but with all those columns it took
> some time to render initially around 5 seconds with Flash Hangin... Not
> very pleasant.
Are you sure deferred rendering was on ?

Tom