Finding sum for each resolution value


When I issue the following API request:


I get serialize PHP data. I unserialize that data, and then try to find out count for each resolution using 2 foreach loops

    $screen_resolutions = array();

    foreach($result as $resolution_arr) {
        foreach ($resolution_arr as $resolution_val) {
            if (isset($screen_resolutions[$resolution_val['label']]))
                $screen_resolutions[$resolution_val['label']] += $resolution_val['nb_visits'];
                $screen_resolutions[$resolution_val['label']] = $resolution_val['nb_visits'];

Here, problem arises.

In API call, I have only fetched data for last 10 days, by mentioning the dates, but when I fetch data for 3 months or some specific range, this calculations takes up so much time.

My Question here is: Is there any way that I can get ‘nb_visits’ sum for each resolution from API call, without performing those time-consuming foreach loops?

Yes, you should use the latest RC (see forum post) and use period=range which will sum over the date range

Thanks Matt

BTW, When is next RC going to release ?