-
remoting optimization
This is my first full site using flash remoting, everything is working, but the wait for data on my product wall is PAINFULLY slow! I decided to look closer at the data being returned and found some suspicious looking blocks of data...
here's an example of what is returned for just one product:
//----------------------------------------------------------------------------------------
65:[object #813, class 'Object'] {
ProductID:128,
ProductSiloID:238,
ProductName:"Zoid™",
Capacity:"100 oz. (3.0 L)",
Description1:"Looking for the perfect all-day, epic pack? The Ventoux\", with dual compression for stability and generous access to the main pocket, will support you on 3+ hours rides and even on your commute to work.",
ImageName:"Zoid",
Volume:"1312 Cu. In. (2154 Cu. CM)",
Weight:null,
Activities:[object #814] {
serverinfo:null,
items:[object #815, class 'Array'] [
0:[object #816, class 'Object'] {
ProductID:128,
ProductName:"Zoid™ ",
ActivityID:120,
ActivityName:"Ski / Board",
__ID__:0
}
],
uniqueID:1,
views:[object #817, class 'Array'] [],
addEventListener:[function 'addEventListener'],
removeEventListener:[function 'removeEventListener'],
dispatchEvent:[function 'dispatchEvent'],
dispatchQueue:[function 'dispatchQueue'],
mTitles:[object #818, class 'Array'] [
0:"ProductID",
1:"ProductName",
2:"ActivityID",
3:"ActivityName"
],
mRecordsAvailable:1,
length:[getter/setter] 1,
length:[getter/setter] 1
},
Colors:[object #819] {
serverinfo:null,
items:[object #820, class 'Array'] [
0:[object #821, class 'Object'] {
ProductID:128,
ColorID:52,
ColorName:"Black",
ColorCode:null,
ColorImage:"black",
SKU:"60360",
__ID__:0
},
1:[object #822, class 'Object'] {
ProductID:128,
ColorID:92,
ColorName:"Olive/Grey",
ColorCode:null,
ColorImage:"olive_grey",
SKU:"60361",
__ID__:1
}
],
uniqueID:2,
views:[object #823, class 'Array'] [],
addEventListener:[function 'addEventListener'],
removeEventListener:[function 'removeEventListener'],
dispatchEvent:[function 'dispatchEvent'],
dispatchQueue:[function 'dispatchQueue'],
mTitles:[object #824, class 'Array'] [
0:"ProductID",
1:"ColorID",
2:"ColorName",
3:"ColorCode",
4:"ColorImage",
5:"SKU"
],
mRecordsAvailable:2,
length:[getter/setter] 2,
length:[getter/setter] 2
},
__ID__:65
},
//----------------------------------------------------------------------------------------
I can't figure out where the eventlistener, dispatchEvent, and mTitle declarations are coming from... our Coldfusion developer says it's from the flash, but this test call is from a blank FLA with the bare essentials for remoting. Duplicated the test to access another site of ours that uses remoting, and the data returned has none of the junk:
53:[object #184, class 'Object'] {
ProductID:331,
ProductName:"Walking Lt Mini Crew",
stylecode:"10-252",
retailprice:12.95,
cushionid:1,
cushionname:"light half cushion",
sockheight:"Mini Crew",
Activities:[object #185, class 'Array'] [
0:"Walking"
],
__ID__:53
}
anyone have any ideas where that junk is coming from?
My flash never has bugs, it just develops random features.
-
Hi,
is one of the "bare essentials" in the flash a "component"?
I would rather expect the short format you show at the end too, than all of the stuff before.
Musicman
-
nope, no components... both are treated exactly the same:
#include "connection.as"
var GetNonLandingPageProductsResult:Object = new Object();
GetNonLandingPageProductsResult.onResult = function(result) {
trace("done");
_level0.myresult = result;
};
GetNonLandingPageProductsResult.onStatus = function(result) {
trace("status"+result);
_level0.myresult = result;
};
_level0.camelbakService = _level0.gatewayConnnection.getService(_root.servic ePath, GetNonLandingPageProductsResult);
_level0.camelbakService.GetNonLandingPageProducts( 1, 2);
My flash never has bugs, it just develops random features.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|