Could it be the game file at fault?

Can a game file (mine is 3ds format) be the problem for the fps drops that I’m having when playing Pokemon Ultra Sun?
Or is it the fact that Citra is not fully optimized for US yet? My PC surely can take it - it can run 9x native with no problems, 30 fps almsot any time, but the thing is that there are sudden fps drops.
Anyway, I am not a PC expert in any way so I’m just asking for a nice answer and maybe a quick explanation: Is it the game file, which I got from a friend which probably downloaded off the internet, or the emulator?
Thanks in advance.

Piracy isn’t supported here.

And it’s probably shader compilation stutters (I don’t really know what causes them, but I can explain whatever I know, if you want to), so it’s the emulator.

I mean, it mostly drops when I start a battle or encounter, so from that standpoint, I say it has a big chance of it just being the emulator. Thanks, anyway, and have a nice day or night!