SMB VS UPNP

I have created a library of videos on a WD MyCloud device and I can access the videos various ways with KODI. I have noticed that when I setup KODI to access the videos with SMB I experience buffering issues with the videos being choppy etc. but if I setup access using the UPNP the buffering issues go away. Why? What protocols give the least issues with buffering but still allow the indexing of the videos that UPNP doesn’t do? Any suggestions are greatly appreciated.