Hello everyone, this is my 1st time to step into realtime data fetching. Data from Google API is fetched through a simple URLLoader and URLRequest classes that returns a JSON data format. The data is changing from time to time so what I want to achieve is my datagrid is updated of the data in "realtime" not by a trigger of a button to make another request.
I tried that idea by making a timer that makes the request every 2 seconds. It's successful though but the result is not ideal because when more data is being updated, the datagrid response is not good and even if only one data is updated every 2 seconds, I noticed that the memory went higher and higher everytime.
Is there a better solution for this to achieve realtime data fetching? I know there is but I just need light on what are the things to be done.