ZF-5959: Picasa extension uses memory like it's going out of style

Issue Type: Performance Improvement Created: 2009-03-06T11:13:58.000+0000 Last Updated: 2012-05-17T18:58:03.000+0000 Status: Open Fix version(s): Reporter: Jeff Fisher (jfisher) Assignee: Jochen Hartmann (jhartmann) Tags: - Zend_Gdata

  • zf-crteam-padraic
  • zf-crteam-priority

Related issues: Attachments:


Currently, the picasa extension takes 18MB of memory to parse an album with only 31 photos in it.

The below script reports 18846720 bytes of memory used for me. (This is right out of the developers guide)

newAlbumQuery(); $query->setUser("stephliu"); $query->setAlbumId( "5257496817114515249" ); $albumFeed = $gp->getAlbumFeed($query); foreach ($albumFeed as $albumEntry) { if ($albumEntry->getMediaGroup()->getContent() != null){ $url = $albumEntry->getMediaGroup()->getContent(); $url = $url[0]->getUrl(); print $url . "\\n"; } } } catch (Zend\_Gdata\_App\_HttpException $e) { echo "Error: " . $e->getMessage() . " \\n"; if ($e->getResponse() != null) { echo "Body: \\n" . $e->getResponse()->getBody() . " \\n"; } echo "Request: \\n" . $e->getRequest() . " \\n"; } catch (Zend\_Gdata\_App\_Exception $e) { echo "Error: " . $e->getMessage() . " \\n"; } catch( Zend\_Uri\_Exception $e){ echo $e; } echo memory\_get\_peak\_usage(); ?>


Posted by Jeff Fisher (jfisher) on 2009-03-06T11:37:50.000+0000

For reference, retrieving a feed with a single entry uses 9197384 or about 9MB of memory.

Posted by Mike Willbanks (digitalstruct) on 2009-06-24T22:00:33.000+0000

This is likely due to the usage of DOM XML which has to parse the full feed which I believe would be up to the package maintainer to really rework this from the current requirements standpoint. Maybe an option to state the parser that should be utilized could be added?

Posted by Shaun Farrell (farrelley) on 2010-03-03T03:21:30.000+0000

I am having this same issue on Gdata_Youtube when I grab a users uploaded videos. My method that loops through the VideoFeed uses lots of memory. Increments of 10megs. I'm pretty sure it has to do the $videoFeed->getNextFeed();

Posted by Adam Lundrigan (adamlundrigan) on 2012-05-17T18:58:02.000+0000

Reclassified (Performance Improvement, Major)

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.