Php :: Flex With AMF Returning Results Slowly?

Sep 3, 2010

I think this is just a matter of fine tuning some different elements, but I'd like to know your take. I've got a Flex app, using the Flex 4 data services, communicating with Zend AMF services. One of the services returns all the results in a database using SELECT * FROM table there are ~1200 rows (140KB package size).

My problem is the response time, it's rage inducing. Total duration is always between 7-8 seconds. All but about 150ms of that is latency. I broke up the PHP to figure out exactly where the latency was and turns out return $rows is eating up ~6.8sec latency. I can deal with 1-2sec, but when I start waiting around for 8sec I feel kinda dumb. I cross checked the query response speed directly from the database, and just like I was expecting the total query time is 45-60ms.

PHP, this is basically just the generated Flex data service code, although in production it isn't the same:

public function getAllProject_entries() {
$stmt = mysqli_prepare($this->connection, "SELECT u.*
FROM $this->tablename u");

[code]....

View 1 Replies


Similar Posts:


Flex :: HTTPService Issue Returning GeoCode Results To DataGrid

Jan 5, 2011

I am creating a Flex3 app to return some results from the Google Geocoding API. I am using the HTTPService Events sample from TourDeFlex as a reference guide to mimic. For now, I have hardcoded the response from Google to use this XML response: [URL] Network Monitor suggests that I am getting a valid response from the XML, but I imagine I have not referenced it correctly for populating my DataGrid?

[Code]...

View 1 Replies

ActionScript 3.0 :: Posting Data To Server And Returning XML Results

Apr 2, 2012

I've created a function to send Post data to my server, and this then outputs xml to the page. What I can't find any information on how to get this data from the page back into flash.

View 2 Replies

Php :: Calling A Page With MySQL Query From Javascript Function Then Returning Results To Another Javascript Function

Jul 8, 2010

I am refactoring some code. I have a PHP page that contains a MySQL query and stores the result in a PHP variable $my_result. This result is then echoed to a Flash SWF during embedding with SWFObject. I now want to call this PHP page that makes the query from a javascript function like so - one change I have made to the PHP is that instead of storing the result in a variable $my_result I am echoing the result. Javascript function to call the PHP page and make the database query

[Code]....

View 2 Replies

Flex :: Returning The Value Of A New CheckBox In Air?

Oct 31, 2009

I am trying to save settings to an XML File and setting the relevant data if the check box is checked or not.

private static function createXMLData():void
{
prefsXML = <preferences/>;
prefsXML.application.@windowsstart =

[Code]....

well i assume that is what the error means, it cannot get details of something that is not set yet.. so how would i get it to check and if nothing then it is obviously a "false".

View 5 Replies

Flex :: Returning Different Sub-classes From A Function?

Dec 21, 2009

Say I have four sub-classes of 'Car'. One for each color. I want to have one function that can build and return a 'color-car' sub-class based on the passed value. This is a dumb example, I know, but it is precisely what I am trying to do only on a smaller scale.

public class Car
{
}
public class BlueCar extends Car

[code]....

Ok. You get it. This doesn't work for a reason unknown to me. I get 1118 errors which complain about conversion of BlueCar into Car, etc...

View 4 Replies

Flex :: URLLoader Returning No Data?

Sep 4, 2010

in AS3 I'm trying to load a URL (a Yahoo address) into the application so I can process the source code and pull things out of it.However, when I load it, or any other page, I get 0 bytes back.Here's my current code.

private function doSearch():void {
var req:URLRequest = new URLRequest("http://yahoo.com");
var loader:URLLoader = new URLLoader();

[code].....

View 1 Replies

Flex Alchemy - Returning A ByteArray From C Function?

Oct 28, 2009

I am using Flex's Alchemy library to generate SWC's out of C files. I have a byte array (unsigned char buffer[size]) in the c-layer that I'd like to return to the ActionScript layer as a ByteArray. Do I have to iterate through the array and explicitly call AS3_Set on each element or is there a way to just return the entire C array at once?

View 2 Replies

Flex Event.bytesLoaded Returning Wrong Value?

Oct 12, 2010

I have a function that's called when a file download has reported progress:

private function progressHandler(event:ProgressEvent):void
{
var percent:Number = Math.round((event.bytesLoaded / event.bytesTotal) * 100.0);
Alert.show(event.bytesLoaded.toString());
//pb.setProgress(percent, 100);
}

Now, this should work fine but unfortunately, event.bytesLoaded is returning much larger values than it should. For a test file (8555 bytes), bytesLoaded goes all the way up to 8973384.

View 1 Replies

DJango :: 500 Error When Returning Object To Flex

Oct 31, 2011

I'm able to return django models that have only CharFields/Dates/Integers, but now I'm trying to return models that have ForeignKey properties and I'm getting this error in Flex in my NetStatusEvent.NET_STATUS onError event handler:
m_info Object (@16491fe9)
code "NetConnection.Call.Failed"
description "HTTP: Status 500"
details "[URL]"
level "error"

Here are the models that matter in models.py:
class RewardActBase(models.Model):
user = models.ForeignKey(User)
start_date = models.DateTimeField(blank=True, null=True)
progress_value = models.IntegerField(default=0)
[Code] .....

Then when I want to get retrieve these object via pyamf, this is the method I'm using, which is giving me the error I listed above.:
@login_required
def get_challenge_act(http_request, location_id):
user = http_request.user
c = ChallengeAct();
[Code] .....

The interesting thing is that if I change my get_challenge_act method to return a property of the ChallengeAct object, I don't get the error. So I can return properties or objects that belong to the ChallengeAct, but not the ChallengeAct itself. For example, the following code returns a Challenge object with no errors:
return c.challenge
So it appears that there is some problem returning a Django model with foreginkey models as properties?

View 1 Replies

Flex :: Search Results Filter Effects

Mar 12, 2010

I've created a search with a couple of comboboxes that allow users to filter their search results. The results are currently using a TileList & itemRenderer to display, and now I'd like to add an animation effect when the user filters their results. I know that you can use the itemsChangeEffect to create an animation effect when the user drags and moves result itmes. So I'd like to know if there's a way to create a similar effect triggered by the filtering on the comboboxes?

View 1 Replies

Flex :: Must Loop To Search Results For A Specific Value?

May 5, 2010

I have a table in the database:

name Opinion
Tim Tim has an opinion
John other random text
Dan Dan's random text
Al Al says something else

I call this data and get it back in

getRecords.lastResult

To access John's opinion, I could use:

getRecords.lastResult[1].opinion

But that's only because I know that John is the second record (record 1), but this may change. So the right way is to search through the results to first find the record index for John, then access his opinion.

I need some sort of a loop? Is there an easier way to search for John directly without a loop?

View 1 Replies

Flex :: ActionScript 3 - Printing Results To Console?

Aug 13, 2010

There's a lot of examples for ActionScript over the web using trace() to print results. I'd tried it using Flash Builder 4, but it don't print to the console. Where can I see the output?

View 4 Replies

Flex :: HitTestPoint Not Giving Correct Results

Sep 27, 2010

I have a movie clip on which I have added a MouseEvent.MOUSE_OUT listener.[code]...

Now the logic is to remove the movie clip on MOUSE_OUT and add it back to stage on MouseOver of another button. The intended functionality is like a slider showing some info

The MouseEvent.MOUSE_OUT firing in this case is not functioning always as expected. When I move the mouse out of the moveclip fast it fires. If I moveout very slowly it does not fire and consequently the movieclip remains on the stage. [code]...

View 4 Replies

Flex :: Extract Test Results From Flash?

Apr 5, 2011

I've got a suite of unit tests for my project (pure AS3), and they all work brilliantly outputting standard JUnit XML to the trace output window. However, when I tried to get my test suite running on our continuous integration server I ran up against a wall.Flash is a sandboxed beast, isolated from the file system. I can't see an intuitive way to get this generated JUnit XML in to our CI software so it can be verified as passing.

I've taken a shot at implementing the approach shown in Continuous Integration with Flex,but it relies on reading trace output logged to flashlog.txt that is prone to failure on many fronts (debug player must be installed, flashlog.txt must be created, mm.cfg file must be configured properly). Also, I find that some of the time it fails to find the results in the flashlog and the build fails despite all the tests passing. This could be because I have too many tests and some are being pushed out of the log file.

View 3 Replies

Flex :: Zend Amf - Display Results In Different Labels

Apr 11, 2011

I've got a simple app that is currently getting information form a database and just displaying the content into a datagrid.

Instead of having this information displayed in a datagrid, I'd like to display it in a couple of labels (first name, last name, phone, etc.), but I'm not really sure how to.

Currently on creationComplete I call my php query function - which looks like this.

public function getPeople() {
return mysql_query("SELECT * FROM tbl_people ORDER BY pers_name ASC");
}

[Code].....

Eventually my query will be modified and will only ever return 1 row from the database. So how do I get the results to display in labels instead of the datagrid?

View 1 Replies

Flex :: Coldfusion Returning Typed Objects / AMF Remoting

May 26, 2010

Is the same possible in ColdFusion? Currently I am using .Net/Fluorine to return objects to the client. Whilst in testing I like to pass strings representing the select statement and the custom object I wish to have returned from my service. Fluorine has a class ASObject to which you can set the var 'typeName'; which works great.

I am hoping that this is possible in Coldfusion. Does anyone know whether you can set the type of the returned object in a similar way. This is especially helpful with large collections as the flash player will convert them to a local object of the same name thus saving interating over the collection to convert the objects to a particular custom object.

[Code]...

View 2 Replies

ActionScript 3.0 :: Flex Returning Values In Function Parameters

Apr 12, 2010

In C you can pass a reference to a data item as a parameter to a function. then within the function you can write to that address thus passing back a value to the caller. Can you do anything similar in AS3?

I know you can use the return statement but I want to return a status by that mechanism plus a value in a parameter.

View 10 Replies

Flex :: Loading Image Dynamically Results In Error

Feb 4, 2010

I am trying to load an image in Flex (AS3) which already exists:
<mx:Image id="Img"/>
With this code:
Img.load('[URL]');
The path is verified to work, but I always get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
I used the code from the documentation and still receive this error!

View 4 Replies

Make Flex 3 Datagrid Show Only One Row Of An ArrayCollection's Results?

Aug 11, 2010

Is there a way to make a Flex 3 Datagrid show only the first node of an arrayCollection, instead of showing all of the arrayCollection's data?[code]...

View 3 Replies

Flex AdvancedDataGrid HierarchicalData XML Results In Unwanted Rows?

Mar 31, 2011

I guess the best way to explain my issue is to describe it in terms of the hierarchical XML data example on Livedocs.

Here, the XML is of the form

<Region Region="Arizona">
<Territory_Rep Territory_Rep="Barbara Jennings" Actual="38865" Estimate="40000"/>
<Territory_Rep Territory_Rep="Dana Binn" Actual="29885" Estimate="30000"/>
</Region>

However, the data I have is more like:

[Code]...

View 1 Replies

Flex :: Overlay Text On AdvancedDataGrid When No Results Returned

Apr 20, 2011

I am trying to overlay a label onto an AdvancedDataGrid when there are no results returned from a call for the data. Here is a mockup of what I am trying to accomplish [URL]. I tried following this previous answer: Drawing an overlay in custom flex component, but this would not work for me because an AdvancedDataGrid is not a Container (and as such does not have a rawChildren property). I would prefer not to need to mess with the data provider, because this table will be used in many location which will have different columns and labelFields.

View 2 Replies

Flex :: PHP Reset DataGrid Records From WebService Results

Aug 8, 2011

I'm using Flex 4.5 with PHP Zend webservice framework. Basically, I have 2 DataGrids that can drag and drop between each other. At the initializing of the component, I call a webservice to populate the top DataGrid. Then the user can drag rows to the bottom DataGrid that get processed and saved later on. My problem is that I want to have a reset button (or cancel button), that will take the user to a new component in the ViewStack, and if they return to the component with the DataGrids, the top DataGrid has the original records and the bottom DataGrid is empty.

I just can't figure out a good way to repopulate the top DataGrid. I can clear it, but it doesn't seem to refresh with the original data. I've tried unsuccessfully to call the webservice again and set the dataprovider to the new lastResult token. I've also tried unsuccessfully to copy the results of the initial webservice call to an ArrayCollection and simply set a Bindable variable to that ArrayCollection (or a backup of that ArrayCollection holding original records).

<?xml version="1.0" encoding="utf-8"?>
<s:NavigatorContent xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:valueObjects="valueObjects.*"
[Code] .....

View 1 Replies

Flex :: Remove Selected Items From Search Results?

Feb 6, 2012

End-User searches for something and an ArrayCollection is returned with Result objects. This is displayed in a data grid.End-User selects a few of the search results and "moves" it over to another datagrid for use later.End-User does another search.

PROBLEM:Some of the search results might contain something the user already previously selected and moved over to the second datagrid. I want to remove these from the second search result.

View 2 Replies

Flex :: Drawing And Binding Results From A Database Token?

Mar 4, 2012

I have been making huge strides in learning Flex and I am very much enjoying it, however,one thing I cannot find is how to bind results from a query in Flex. I have managed to create lists etc no problem but when I try to bind one specific value to a variable, it does not work.First off, here is my PHP function:

public function getRepnameByUsername($itemID) {
$stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename where Username=?");

[code]......

View 1 Replies

Javascript :: Returning To Flex After PayPal Express Checkout Payment?

Oct 2, 2009

I have successfully integrated PayPal Express into a Flex application. In oExpressCheckoutPayment.php, I have the following JavaScript line of code that will not execute:

window.opener.window.document.getElementById('index').paymentComplete();
'index' - http://mysite.com/index.html# contains index.swf
'paymentComplete()' - the function that finishes processing the transaction

[code].....

View 4 Replies

Flex :: ArrayCollection Not Returning Absolute Length When Filterfunction Is Applied On It

Apr 24, 2011

My Dataprovider for a grid is an arrayCollection which is dynamically loaded with Objects . for example : a person object with persionID,PersonName ..etc . I applied a filter function on my dataprovider based on personID . below is my function

public function FilterFunc(item:Object):Boolean
{
var same:Boolean=String(item.personID ) == filterpersonID ;
return same;

[Code]....

this function is called whenever a new object is being added to the arraycollection . The problem now is dp.length in the above function is returning only the no of objects of the particular personID on which the filterFunction was applied instead of the absolute value . Its not limiting the size of the other objects which are runnning into thousand's causing memory issues . once i change the filterFunction to different personID , it slowly starts limiting the respective personID objects. So the sizeHandler() limits only the personID objects for which filterfunction was applied instead of the whole objects , this is the problem .

View 2 Replies

Actionscript 3 :: Deployed Flex Applet Not Processing Web Service Results

Nov 20, 2010

When I test my deployed app in a browser the popup window continues to be displayed even after it should be closed. Everything works as expected when debugged in Flash Builder 4.

Following is currently what's happening: the request is sent to my restful web service, which processes the request, (seemingly) the ResultEvent is called which in turn dispatches the profileEvt dynamic event that changes the view state. However, the popup window does not get closed and the applet gets 'stuck.'

Below are the flex applet web service event listeners/handlers:

webService.addEventListener(ResultEvent.RESULT, function(event:ResultEvent):void
{
var rawData:String = String(event.result);
var profileEvt:DynamicEvent = new DynamicEvent("profileSaved", true);

[Code].....

View 1 Replies

Flex :: Make An AdvancedDataGrid Re-display Its Labels When The Results Of The LabelFunction Change?

Mar 31, 2010

I have an AdvancedDataGrid with a custom label function whose value can change based on other form status (specifically, there's a drop down to choose the time display format for some columns).Right now, I have this labelFunction:

internal function formatColumnTime(item: Object, column: AdvancedDataGridColumn): String {
var seconds: Number = item[column.dataField];
return timeFormat.selectedItem.labelFunction(seconds);
}

[code]....

... and the timeFormat object is a combo box with items whose labelFunction attributes are formatTimeAsFractions and formatTimeAsInterval.The columns that have time formats have formatColumnTime as their labelFunction value, because extracting the seconds in that function and passing it in to the formatters made for a more testable app (IMHO).

when the timeFormat.selectedItem value changes, I want to force my grid to re-calculate the labels of these colums. What method must I call on it? invalidateProperties() didn't work, so that's out.

View 2 Replies

Java :: Flex - LCDS Service Returning Null Asynctoken When Executed 2nd Time?

Dec 23, 2011

I'm developing a Flex application using RobotLegs, LiveCycle DS & Java.I'm trying to implement an update function, using LCDS, but I'm running into some strange behaviour:This is the ActionScript code within a RobotLegs' execute command, used to perform the update:

var token:AsyncToken = services.requestService.commit(new Array(model.currentRequestDetail));
responder = new AsyncResponder(resultHandler, faultHandler, token);

[code].....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved