When importing Arduino libraries, there are several housekeeping tasks you should perform for the the code to run efficiently.
See Also:
Using the Extern Definition block
Removing Delay functions