Once the files are decompressed DaVinci Resolve uses the GPU for image processing so the number of GPU cores and the size of GPU RAM becomes a very important factor when dealing with UHD and 4K-DCI sources and timelines. If you use these types of compressed codecs you will need a more powerful CPU or be prepared to use proxies or Resolves optimised media feature. H.264 and H.265 are heavily compressed formats and while not ideal for editing are often used by lower cost cameras.
The decompression process, like compression, uses the CPU so the heavily compressed codecs need more powerful and a greater number of CPU cores. However for editing, VFX and grading, the compressed data needs to be decompressed to the full RGB per pixel bit depth that can use four times or more processing power of a HD image for the same real time grading performance.