• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

PunCrathod

Recruit
29 Badges
Jan 27, 2011
2
0
  • Dungeonland
  • Crusader Kings II: Charlemagne
  • Prison Architect
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Age of Wonders: Shadow Magic
  • Age of Wonders III
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • 500k Club
  • Warlock: Master of the Arcane
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Rajas of India
  • Heir to the Throne
  • Magicka
  • Sword of the Stars II
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
I have pointed this out before in one of the fps problem threads but I quess it got drowned by others so here it is again. The game is doing something very wrong with input handling. My guess is it is constantly polling every and all HID device windows has listed witch creates a truckload of unneccessary overhead making the game unplayable. You should only poll those devices you have verified as being connected and in use by the application. If you want to support hotplugging then I suggest you keep a list of connected and in use input devices and update that list when windows raises an event that a new device has been connected or if you can't figure out how to see the event add a refresh controllers button in the menu or something. But for the love of god please stop polling every single one of them every single frame.

This issue usually only affects those who have more input devices and don't always plug them in on the same usb port as the same controller will be a different device in windows' side if it is plugged in a different port. And windows does not remove unplugged devices from its list so there can be quite a few of ghost devices. It gets even worse if your input device is wireless as the timeout when polling wheter it is connected is quite long. I have four wired and four wireless controllers and those alone have generated hundreds of ghost HID devices. Wich normally doesn't cause any problems as most games only check what devices are connected at the start. Someone might say that you should remove those ghost devices. But the problem is there are no practical ways to do so. They don't show up in device manager without messing with system settings from the command line. And even then it doesn't differentiate the devices from eachother so you have to be extra carefull about wich ones you remove or you might accidentally remove your keyboard, mouse, printer or even your monitor.

This issue is really easy to detect. Just open up resource monitor and see how much CPU time svchost.exe (dcomlaunch)'s plug and play service takes. Normally it should be quite low. Usually well under 1%.
This is what it looks like when I boot up dungeonland.
SYKjAAMbK.jpg

As you can see the plug and play service uses up over 7% of my cpu wich is over 50% of one 3ghz core. And its even more than the actual game is using. Mostly because the game is waiting for the service to tell wether all of my 200 ghost HID devices are connected.

And this is what it looks like when playing any other game. Where everything is working as it should.
7Q66v1nYp.jpg


This is not the first game where I have seen this happen. And some of the devs of those games were very nice when I pointed this out and fixed it within a few days. And after that a lot of complaining about fps problems dissappeared. And everyone was happier. This problem isn't entirely your fault. It's mostly microsoft and its poor handling of disconnected devices and their philosophy of never polling input and relying on events but there's nothing we can do about that so fixing this falls to you.

I can work around this by manually disabling all other HID devices than the ones I'm using in half an hour or so but some of the friends I'd want to play this with also suffer from this same issue and they are not as patient as I am and just say "I'll wait until they patch this." and then go play something else.
 
Upvote 0