views:

270

answers:

1

Hi, When i use loader.load(request); for the first time, my flex freeze for 10 secondes before posting the data (i can see the web server result in real time). However if redo a similar POST with other data but same request.url, it's instantaneous.

// Multi form encoded data
variables = new URLVariables();
variables.user = "aaa";
variables.boardjpg = new URLFileVariable(data.boardBytes, "foo.jpg");
request = new URLRequestBuilder(variables).build();
request.url = "http://localhost:8000/upload/";

loader.load(request);

How can i see what is taking so long ?

Thanks !

A: 

Ok, this is an old question, anyway I find it searching for other things so quick adding this URLFileVariables nor URLRequestBuilder are core classes in AS3, so I guess you're using some custom library to build your request. I don't know which library you use, but it seems that the purpose is to serialize some binary data to build a POST. Serializing usually takes some times the first time (lookup initialization and the like) and goes faster next, a well known example is Remoting in his different flavours