Im currently using drupal 7 + commerce for online sales and I have a phonegap app that creates orders. I want to use drupal 7 via a the services module to sync the app sales data with the online store. My concern is speed as drupal requires a full bootstrap for each service call. Is there another recomended way to access the drupal 7 commerce database directly that would perform the crud operations faster?

  • Can't give you specific solutions, but just pointing a nice Drupal Group discussing this issue: Headless Drupal
    – Isra
    Jul 16, 2014 at 23:44

3 Answers 3


Not sure if "faster" but I'd recommend the integration of Drupal Commerce and Phonegap (I'm guessing you're using DrupalGap already) if you're already using both: https://www.drupal.org/project/commerce_drupalgap

You've got plenty of resources there to get started such as the Commerce Services module.

It's up to you to decide where you need or not a full bootstrap of your backend, I'm thinking you need it to get advantage of user access, permissions and consistency check in your order status, but it depends a lot on your app and where you're implementing the business logic. If you access the database directly, without any bootstrap is going to be faster, but the same way you build a drupal site, if you bypass Drupal to access directly to the database that'd be faster as well.


I don't think so, you'll always need a full boostrap to access Drupal data.

The fact that Drupal 8 is a RESTfull server should give a hint that is the good way to do it ;-)


This doesnt really help you for services, but if you have any custom data endpoints that you want your app to pull in you can use the High-performance JavaScript callback handler module.

It allows you to specify what parts of drupal you need to load to build your data, without loading the parts you don't need.

The module's README.txt file provides more detailed information on how to use it, but basically you are just implementing one additional hook to tell it what bootstrap level you want, what includes & modules you need loaded, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.