Can I increase CPU power of my rMBP 13 by plugging to another computer (target disk mode or other)? I own a MacBook Pro 13" (early 2015). It has a dual-core i5 2,9GHz processor, 8go DDR3 RAM and 512Gb hard disk.

The computer performs well in general. I use it exclusively for web development. My memory usage is quite good, I have a memory pressure around 55% in general.

However, several times in a day my CPU hang up during heavy tasks:


debugging,
indexing in the IDE,
database backup,
and several other docker manipulations.


I was wondering if there is some way to increase my CPU power while working at office. 

I read about connecting the MBP to an iMac and booting it in "target disk mode". It appears I can run my system using the hardware of the iMac.

However, it looks like this is rarely used, and I didn't find some good user reports on using it.

So, some questions:


Does it perform really well and really better ?
Can I have a lost of performance because of the use of the thunderbolt port ?
Is it safe ?
Does sofwtare complains about switching from one system to another ?
Are there any other alternatives ?
Does the performance gain can be better than simply upgrading to an early MBP 15 inch ?
To answer your questions quickly:


Yes
No
Very likely
Probably
Not really
Maybe


Explanation:
Note that this is assuming you are booting the laptops SSD drive from the iMac. Basically this operation allows you to use the internal SSD as an external hard drive. If you boot into this drive from another computer, you are now using the resources that the computer you are working on offers. (If you go to about this Mac, you'll see the specs of the iMac you are now using.) This is definitely possible to do, and because thunderbolt speeds are at least 10Gbps (faster than the read/write speeds of the PCIe SSD), the thunderbolt cable will not be a bottleneck. It is very likely safe to do, although you should ALWAYS have a current backup in case something goes sideways. Most software should be ok with the switch, as the SSD's ID is still the same, but it is something you should test out by trying. Again, have a backup in case something goes wrong. Your only other option would be to get a new computer. The performance gain by getting the higher end 15" MBP might work, but iMacs will likely have more power than any laptop because there is more cooling space and less power worries, so Apple can put faster processors in.

TL;DR: if you have an iMac available, that is a great idea! If you'd have to buy an iMac to make this happen, you might want to explore other options.

Please let me know if something was unclear or you have any questions/comments/clarifications about my answer.