Title: wpdm_setup_package_data function came very slow recently
Last modified: August 31, 2016

---

# wpdm_setup_package_data function came very slow recently

 *  [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * (@jackdewey)
 * [10 years ago](https://wordpress.org/support/topic/wpdm_setup_package_data-function-came-very-slow-recently/)
 * Hi, I have built my own plugin on top of WPML for display of items. As part of
   my plugin, I was using the wpdm_setup_package_data function to get an array of
   information on the retrieved item. While this function was very quick when I 
   first implemented the system last fall, it became very slow with recent versions.
   Retrieving data on 25 items would take about 10 seconds for the output to get
   prepared, whereas the output was generated almost instantaneously when I commented
   out that single call.
 * As a workaround, I am going straight to the meta post data and getting the information
   I need on each download package, but you should see about correcing the wpdm_setup_package_data
   utility function to regain its performance.
 * [https://wordpress.org/plugins/download-manager/](https://wordpress.org/plugins/download-manager/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Shahjada](https://wordpress.org/support/users/codename065/)
 * (@codename065)
 * [10 years ago](https://wordpress.org/support/topic/wpdm_setup_package_data-function-came-very-slow-recently/#post-7385756)
 * If it is possible for us to check the issue in your site, it would be helpful
   for us to find the exact reason, if that’s ok with you, please post here [http://www.wpdownloadmanager.com/support/forum/download-manager-free/](http://www.wpdownloadmanager.com/support/forum/download-manager-free/)
 *  Thread Starter [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * (@jackdewey)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/wpdm_setup_package_data-function-came-very-slow-recently/#post-7385782)
 * No, it is not possible to see the issue on the site since it is a corporate intranet.
 * Even if you could, I am not sure what you are expecting to see that could help
   isolate the issue just by looking at the page output. I am not using the shortcodes
   provided by Download Manager to display my files. I am using my own shortcode
   that I developed that is calling wpdm_setup_package_data within a WP_query loop
   that I constructed.
 * The problem was occurring when I tried calling wpdm_setup_package_data. The web
   browser would not receive any data from the server for 10-11 seconds. When I 
   replaced that call with retrieving the post meta directly, the refresh became
   instantaneous.
 * The performance was originally very fast with this call when I first implemented
   this site last fall.
 *  Plugin Author [Shahjada](https://wordpress.org/support/users/codename065/)
 * (@codename065)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/wpdm_setup_package_data-function-came-very-slow-recently/#post-7385806)
 * Ok, no problem, however, we are rechecking this and hopefully it will be lot 
   faster in next update.
 *  Thread Starter [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * (@jackdewey)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/wpdm_setup_package_data-function-came-very-slow-recently/#post-7385807)
 * Thank you for investigating this.
 *  [KRWonders](https://wordpress.org/support/users/krwonders/)
 * (@krwonders)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/wpdm_setup_package_data-function-came-very-slow-recently/#post-7385848)
 * Hello, I would just like to chime in to report a similar issue on a site I manage.
   
   It seems also that the larger the file, the longer it takes for the download 
   to start after hitting the “download” link. I am using wpdm_category to display
   whole categories at a time: usually less than 15 items per category. I also noticed
   like Yannick above that this issue does not occur when linking to a single file.
   And also, I didn’t have any issue with this with earlier versions.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘wpdm_setup_package_data function came very slow recently’ is closed to
new replies.

 * ![](https://ps.w.org/download-manager/assets/icon-256x256.png?rev=1561688)
 * [Download Manager](https://wordpress.org/plugins/download-manager/)
 * [Support Threads](https://wordpress.org/support/plugin/download-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/download-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/download-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/download-manager/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [KRWonders](https://wordpress.org/support/users/krwonders/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/wpdm_setup_package_data-function-came-very-slow-recently/#post-7385848)
 * Status: not resolved