XF 2.0 Performance issues with .phpstorm.meta.php?

Jake B.

Well-known member
Not really related to XenForo, but my phpStorm install regularly hits ~25% CPU under normal circumstances and there really aren't any noticeable issues. However, when I have a .phpstorm.meta.php file in my XF root I get spikes to 130%+ and causes ridiculous input lag whenever it attempts to autocomplete or provide code suggestions. Anyone else run into this? Only seems to have happened after upgrading to the latest version (2017.3.4)


Well-known member
I'm getting the same and the input lag makes it ridiculously difficult to get work done. Not figured out what's causing it and I've disabled a bunch of random crap on my conquest to figure out what's causing it. I do have a meta file kicking so might try getting rid of that.

Chris D

XenForo developer
Staff member
Looks like I don't even have a metadata file in my local install anymore, and I can't say I actually noticed.

I can't recall any performance issues when I was using it (but it could have been a while ago), but I had started to become dissatisfied with it. They made a change which prevented the metadata working if the function you were using contained more than one argument.

So for example:
$user = $em->find('XF:User', 1);
In older versions, that would be hinted correctly as an XF\Entity\User object, but in recent versions because there is more than one argument it prevents it even bothering.

I made a report about it:

Incidentally, that would be the best place to report issues with it. What you're both describing sounds like it could be a bug so hopefully it's something they'll address.
Reactions: Xon

DragonByte Tech

Well-known member
Personally I experienced no difference in CPU time with or without a meta file just from very basic testing, although I'll keep it around for a bit and see whether I experience any significant lag.

I tend to sprinkle my code with @var comments anyway so even if I do have to delete it, it's not that big of a deal :D