From pains (plural usage) + taking.
painstaking (comparative more painstaking, superlative most painstaking)
- Carefully attentive to details; diligent in performing a process or procedure.
Derived terms 
careful attentive; diligent
- The application of careful and attentive effort.
- 1603, John Florio, translating Michel de Montaigne, Essays, II.10:
- I esteeme Bocace his Decameron, Rabelais, and the kisses of John the second (if they may be placed under this title) worth the paines-taking to reade them.