Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Treeview Performance

5 posts in Objects Last posting was on 2003-10-14 22:06:23.0Z
Andreas Lang Posted on 2003-09-03 14:22:48.0Z
From: "Andreas Lang" <alangATetmDOTat>
Newsgroups: sybase.public.powerbuilder.objects
Organization: 212.88.180.5
X-Newsreader: AspNNTP 1.50 (Tri Hoang)
Subject: Treeview Performance
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: transinc-win02.netoptex.com
X-Original-NNTP-Posting-Host: transinc-win02.netoptex.com
Message-ID: <3f55f938$1@forums-1-dub>
Date: 3 Sep 2003 07:22:48 -0700
X-Trace: forums-1-dub 1062598968 206.169.167.22 (3 Sep 2003 07:22:48 -0700)
X-Original-Trace: 3 Sep 2003 07:22:48 -0700, transinc-win02.netoptex.com
Lines: 37
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7571
Article PK: 734856

Hello!

We have developped an application under PB 6.5 and migrated it this year to PB
9.0. In this application we have treeviews with very many items (more than
10000).

Under PB 6.5 these treeviews performed o.k. (filling and emptying), but under PB
9.0 the performance is very slow.

For exampling emptying the tree, using the following code, is quite quick under
PB 6.5, even if there are many roots:

ll_item = tv_1.FindItem(RootTreeItem!, 0)
do while ll_item <> -1
tv_1.DeleteItem(ll_item)
ll_item = tv_1.FindItem(RootTreeItem!, 0)
loop


Under PB 9.0 this code took many minutes. Therefore I created an overall-root
under which all items are placed, so the performance was o.k. The code changed
to:

ll_item = tv_1.FindItem(RootTreeItem!, 0)
tv_1.DeleteItem(ll_item)

But filling the tree is still very slow.

Does anyone know, why PB 9.0's treeviews are so much slower? Has anyone
experencied similar problems or does anyone know how to speed the PB 9.0
treeviews up?

Any help or hints would be very appreciated,

Andreas Lang
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Philip Salgannik Posted on 2003-09-03 14:50:22.0Z
Sender: 6fdd.3f55fea3.1804289383@sybase.com
From: Philip Salgannik
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Treeview Performance
X-Mailer: WebNews to Mail Gateway v1.1s
Message-ID: <3f55ffae.700b.846930886@sybase.com>
References: <3f55f938$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 3 Sep 2003 07:50:22 -0700
X-Trace: forums-1-dub 1062600622 10.22.241.41 (3 Sep 2003 07:50:22 -0700)
X-Original-Trace: 3 Sep 2003 07:50:22 -0700, 10.22.241.41
Lines: 48
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7572
Article PK: 734853

Starting with version 7, PowerBuilder uses Microsoft Common
Controls Treeview instead of the Powesoft's own
implementation.
What might be happening is that you are populating the same
nodes over and over again (due to some changes in event
mappings and their order of execution).
Also, it is highly impractical to completely load treeviews
with so many items (10K is a lot). You might want to rethink
your design and go with population of nodes on demand...

> Hello!
>
> We have developped an application under PB 6.5 and
> migrated it this year to PB 9.0. In this application we
> have treeviews with very many items (more than 10000).
>
> Under PB 6.5 these treeviews performed o.k. (filling and
> emptying), but under PB 9.0 the performance is very slow.
>
> For exampling emptying the tree, using the following code,
> is quite quick under PB 6.5, even if there are many roots:
>
> ll_item = tv_1.FindItem(RootTreeItem!, 0)
> do while ll_item <> -1
> tv_1.DeleteItem(ll_item)
> ll_item = tv_1.FindItem(RootTreeItem!, 0)
> loop
>
>
> Under PB 9.0 this code took many minutes. Therefore I
> created an overall-root under which all items are placed,
> so the performance was o.k. The code changed to:
>
> ll_item = tv_1.FindItem(RootTreeItem!, 0)
> tv_1.DeleteItem(ll_item)
>
> But filling the tree is still very slow.
>
> Does anyone know, why PB 9.0's treeviews are so much
> slower? Has anyone experencied similar problems or does
> anyone know how to speed the PB 9.0 treeviews up?
>
> Any help or hints would be very appreciated,
>
> Andreas Lang
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp


Andreas Lang Posted on 2003-09-04 11:54:45.0Z
Reply-To: "Andreas Lang" <alang@etm.at>
From: "Andreas Lang" <alang@etm.at>
Newsgroups: sybase.public.powerbuilder.objects
References: <3f55f938$1@forums-1-dub> <3f55ffae.700b.846930886@sybase.com>
Subject: Re: Treeview Performance
Lines: 65
Organization: etm
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
X-Original-NNTP-Posting-Host: ns.etm.at
Message-ID: <3f572855@forums-2-dub>
X-Original-Trace: 4 Sep 2003 04:56:05 -0700, ns.etm.at
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 4 Sep 2003 04:52:32 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 4 Sep 2003 04:54:45 -0700
X-Trace: forums-1-dub 1062676485 10.22.108.75 (4 Sep 2003 04:54:45 -0700)
X-Original-Trace: 4 Sep 2003 04:54:45 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7575
Article PK: 734857

Thank you for your answer.

<Philip Salgannik> schrieb im Newsbeitrag
news:3f55ffae.700b.846930886@sybase.com...

> Starting with version 7, PowerBuilder uses Microsoft Common
> Controls Treeview instead of the Powesoft's own
> implementation.

There is probably no way back to Powersoft's own implementation and staying
with PB 9.0, isn't it?

> What might be happening is that you are populating the same
> nodes over and over again (due to some changes in event
> mappings and their order of execution).

I will check this out. Do you have any experience with this different event
mappings?

> Also, it is highly impractical to completely load treeviews
> with so many items (10K is a lot). You might want to rethink
> your design and go with population of nodes on demand...

We have done this.
The problem is that sometimes the treeviews are totally flat (as the user
has not yet structured the items) and then loading on demand does not help.

> > Hello!
> >
> > We have developped an application under PB 6.5 and
> > migrated it this year to PB 9.0. In this application we
> > have treeviews with very many items (more than 10000).
> >
> > Under PB 6.5 these treeviews performed o.k. (filling and
> > emptying), but under PB 9.0 the performance is very slow.
> >
> > For exampling emptying the tree, using the following code,
> > is quite quick under PB 6.5, even if there are many roots:
> >
> > ll_item = tv_1.FindItem(RootTreeItem!, 0)
> > do while ll_item <> -1
> > tv_1.DeleteItem(ll_item)
> > ll_item = tv_1.FindItem(RootTreeItem!, 0)
> > loop
> >
> >
> > Under PB 9.0 this code took many minutes. Therefore I
> > created an overall-root under which all items are placed,
> > so the performance was o.k. The code changed to:
> >
> > ll_item = tv_1.FindItem(RootTreeItem!, 0)
> > tv_1.DeleteItem(ll_item)
> >
> > But filling the tree is still very slow.
> >
> > Does anyone know, why PB 9.0's treeviews are so much
> > slower? Has anyone experencied similar problems or does
> > anyone know how to speed the PB 9.0 treeviews up?
> >
> > Any help or hints would be very appreciated,
> >
> > Andreas Lang
> > ---== Posted via the PFCGuide Web Newsreader ==---
> > http://www.pfcguide.com/_newsgroups/group_list.asp


Marilyn Kotwal Posted on 2003-09-09 13:55:50.0Z
Message-ID: <3F5DDB29.3DE9881A@sybase.com>
From: Marilyn Kotwal <kotwal@sybase.com>
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Treeview Performance
References: <3f55f938$1@forums-1-dub> <3f55ffae.700b.846930886@sybase.com> <3f572855@forums-2-dub>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: kotwal-pc.sybase.com
X-Original-Trace: 9 Sep 2003 06:57:25 -0700, kotwal-pc.sybase.com
Lines: 72
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 9 Sep 2003 06:53:06 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 9 Sep 2003 06:55:50 -0700
X-Trace: forums-1-dub 1063115750 10.22.108.75 (9 Sep 2003 06:55:50 -0700)
X-Original-Trace: 9 Sep 2003 06:55:50 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7582
Article PK: 734864

Take a look at the section on migrating from PowerBuilder 6.5 or earlier in the
release bulletin:
http://sybooks.sybase.com/pbr0900e.html
There's a section on treeviews that might help.

Marilyn Kotwal

Andreas Lang wrote:

> Thank you for your answer.
>
> <Philip Salgannik> schrieb im Newsbeitrag
> news:3f55ffae.700b.846930886@sybase.com...
> > Starting with version 7, PowerBuilder uses Microsoft Common
> > Controls Treeview instead of the Powesoft's own
> > implementation.
>
> There is probably no way back to Powersoft's own implementation and staying
> with PB 9.0, isn't it?
>
> > What might be happening is that you are populating the same
> > nodes over and over again (due to some changes in event
> > mappings and their order of execution).
>
> I will check this out. Do you have any experience with this different event
> mappings?
>
> > Also, it is highly impractical to completely load treeviews
> > with so many items (10K is a lot). You might want to rethink
> > your design and go with population of nodes on demand...
>
> We have done this.
> The problem is that sometimes the treeviews are totally flat (as the user
> has not yet structured the items) and then loading on demand does not help.
>
> > > Hello!
> > >
> > > We have developped an application under PB 6.5 and
> > > migrated it this year to PB 9.0. In this application we
> > > have treeviews with very many items (more than 10000).
> > >
> > > Under PB 6.5 these treeviews performed o.k. (filling and
> > > emptying), but under PB 9.0 the performance is very slow.
> > >
> > > For exampling emptying the tree, using the following code,
> > > is quite quick under PB 6.5, even if there are many roots:
> > >
> > > ll_item = tv_1.FindItem(RootTreeItem!, 0)
> > > do while ll_item <> -1
> > > tv_1.DeleteItem(ll_item)
> > > ll_item = tv_1.FindItem(RootTreeItem!, 0)
> > > loop
> > >
> > >
> > > Under PB 9.0 this code took many minutes. Therefore I
> > > created an overall-root under which all items are placed,
> > > so the performance was o.k. The code changed to:
> > >
> > > ll_item = tv_1.FindItem(RootTreeItem!, 0)
> > > tv_1.DeleteItem(ll_item)
> > >
> > > But filling the tree is still very slow.
> > >
> > > Does anyone know, why PB 9.0's treeviews are so much
> > > slower? Has anyone experencied similar problems or does
> > > anyone know how to speed the PB 9.0 treeviews up?
> > >
> > > Any help or hints would be very appreciated,
> > >
> > > Andreas Lang
> > > ---== Posted via the PFCGuide Web Newsreader ==---
> > > http://www.pfcguide.com/_newsgroups/group_list.asp


forums.sybase.com Posted on 2003-10-14 22:06:23.0Z
From: "forums.sybase.com" <bdoerr@goawaysolarc.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <3f55f938$1@forums-1-dub>
Subject: Re: Treeview Performance
Lines: 55
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Original-NNTP-Posting-Host: 207.27.249.117
Message-ID: <3f8c743f@forums-2-dub>
X-Original-Trace: 14 Oct 2003 15:10:07 -0700, 207.27.249.117
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 14 Oct 2003 15:00:12 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 14 Oct 2003 15:06:23 -0700
X-Trace: forums-1-dub 1066169183 10.22.108.75 (14 Oct 2003 15:06:23 -0700)
X-Original-Trace: 14 Oct 2003 15:06:23 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7622
Article PK: 734908

One thing I used to have to do in older versions is set the sort of the
treeview to NoSort! before I populate the tree and then turn it back on
afterwards. It actually sorts every time you add a node, so this gets very
slow on large datasets.

Also make sure that you are reusing picture indexes, because otherwise it
might be loading the bitmaps over and over. I notices that when I was
running and the bitmaps weren't in my path, it was very slow.

"Andreas Lang" <alangATetmDOTat> wrote in message
news:3f55f938$1@forums-1-dub...
> Hello!
>
> We have developped an application under PB 6.5 and migrated it this year
to PB
> 9.0. In this application we have treeviews with very many items (more than
> 10000).
>
> Under PB 6.5 these treeviews performed o.k. (filling and emptying), but
under PB
> 9.0 the performance is very slow.
>
> For exampling emptying the tree, using the following code, is quite quick
under
> PB 6.5, even if there are many roots:
>
> ll_item = tv_1.FindItem(RootTreeItem!, 0)
> do while ll_item <> -1
> tv_1.DeleteItem(ll_item)
> ll_item = tv_1.FindItem(RootTreeItem!, 0)
> loop
>
>
> Under PB 9.0 this code took many minutes. Therefore I created an
overall-root
> under which all items are placed, so the performance was o.k. The code
changed
> to:
>
> ll_item = tv_1.FindItem(RootTreeItem!, 0)
> tv_1.DeleteItem(ll_item)
>
> But filling the tree is still very slow.
>
> Does anyone know, why PB 9.0's treeviews are so much slower? Has anyone
> experencied similar problems or does anyone know how to speed the PB 9.0
> treeviews up?
>
> Any help or hints would be very appreciated,
>
> Andreas Lang
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp