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.

Optimizing JavaScipt Question

4 posts in General Discussion Last posting was on 2004-07-07 02:05:52.0Z
Javascript Development Posted on 2004-06-29 05:33:20.0Z
Sender: 29ba.40e0f8ed.1804289383@sybase.com
From: Javascript Development
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Optimizing JavaScipt Question
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <40e0ffbf.29e5.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 28 Jun 2004 22:35:59 -0700, 10.22.241.42
Lines: 51
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 28 Jun 2004 22:28:51 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 28 Jun 2004 22:33:20 -0700
X-Trace: forums-1-dub 1088487200 10.22.108.75 (28 Jun 2004 22:33:20 -0700)
X-Original-Trace: 28 Jun 2004 22:33:20 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:92
Article PK: 8711

We are deploying an application that has several forms with
hierarchical, dynamic dropdowns. The dropdowns are in the
format of category--> value where the user selects a
"category", and then the "value" dropdown is repopulated
with those items that are associated with the selected
category.


We have been performing extensive testing across a number of
device models and have encountered a noticable performance
lag in the loading of pages and the repopulation of
dropdowns on the Palm Tungsten E (126MHz TI OMAP ARM
Processor).

We generate a different javascript function for each
"repopulate" operation and these are called based on the
user's selection in the category dropdown. Each
"repopulate" function looks like the following:

function PopulateValueDropdown4_0(iParentId) {
var oDropdown = document.frm.ValueDropdown;
oDropdown[oDropdown.length] = new Option("Select a
Value","-1",false,false);
oDropdown[oDropdown.length] = new Option("Value
1","10",false,false);
oDropdown[oDropdown.length] = new Option("Value
2","15",false,false);
oDropdown[oDropdown.length] = new Option("Value
3","16",false,false);
oDropdown[oDropdown.length] = new Option("Value
4","24",false,false);

//--> etc.

}


With this model, we are noticing a few second lag between
category selection and the value dropdown getting populated.


We have read all of the developer guides and handbook and
tried the optimization techniques in the tech notes, but
have had no luck.

Based on the approach we are taking, does anyone have any
advice on how we can achieve faster javascript execution?
We have stayed away from large arrays in the past due to
even more severe performance issues and I would prefer to
stay away from XML database API to solve this problem. Any
suggestions or thoughts would be much appreciated.


Tom Silverstrim Posted on 2004-06-29 21:16:05.0Z
Sender: 397e.40e1db7d.1804289383@sybase.com
From: Tom Silverstrim
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Optimizing JavaScipt Question
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <40e1dcb8.399f.1681692777@sybase.com>
References: <40e0ffbf.29e5.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 29 Jun 2004 14:18:48 -0700, 10.22.241.42
Lines: 75
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 29 Jun 2004 14:11:33 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 29 Jun 2004 14:16:05 -0700
X-Trace: forums-1-dub 1088543765 10.22.108.75 (29 Jun 2004 14:16:05 -0700)
X-Original-Trace: 29 Jun 2004 14:16:05 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:93
Article PK: 17575

Hello,

Have you turned off Javascript compression in the sync.conf
file on the server?

Search for the following:
SyncPref QuadCompressJS TRUE

Set this value to "FALSE"

You will need to restart the Sync Server and re-sync in
order to determine effect on the device.

This will improve on-device performance, but there will be
an increase in the Javascript file size. Usually this is a
small portion of the entire channel size and you will see
minimal impact in overall channel size.

Let me know if this helps.

Tom Silverstrim

> We are deploying an application that has several forms
> with hierarchical, dynamic dropdowns. The dropdowns are
> in the format of category--> value where the user selects
> a "category", and then the "value" dropdown is repopulated
> with those items that are associated with the selected
> category.
>
>
> We have been performing extensive testing across a number
> of device models and have encountered a noticable
> performance lag in the loading of pages and the
> repopulation of dropdowns on the Palm Tungsten E (126MHz
> TI OMAP ARM Processor).
>
> We generate a different javascript function for each
> "repopulate" operation and these are called based on the
> user's selection in the category dropdown. Each
> "repopulate" function looks like the following:
>
> function PopulateValueDropdown4_0(iParentId) {
> var oDropdown = document.frm.ValueDropdown;
> oDropdown[oDropdown.length] = new Option("Select a
> Value","-1",false,false);
> oDropdown[oDropdown.length] = new Option("Value
> 1","10",false,false);
> oDropdown[oDropdown.length] = new Option("Value
> 2","15",false,false);
> oDropdown[oDropdown.length] = new Option("Value
> 3","16",false,false);
> oDropdown[oDropdown.length] = new Option("Value
> 4","24",false,false);
>
> //--> etc.
>
> }
>
>
> With this model, we are noticing a few second lag between
> category selection and the value dropdown getting
> populated.
>
>
> We have read all of the developer guides and handbook and
> tried the optimization techniques in the tech notes, but
> have had no luck.
>
> Based on the approach we are taking, does anyone have any
> advice on how we can achieve faster javascript execution?
> We have stayed away from large arrays in the past due to
> even more severe performance issues and I would prefer to
> stay away from XML database API to solve this problem.
> Any suggestions or thoughts would be much appreciated.