I have some modules that Im not using and they are inactive, if I uninstall and delete those modules could I improve th performance of my site, my site is becoming very very slow, the ajax requests are slow everything is slow....
Definitely it would slow down your site performance as realized from my personal experience. Every time drupal look for .info file and unnecessary read that, if any hook alter function is there it also get executed every time. It also checking for latest updates, unnecessary increasing headache to your system. If some js or css is using in that module, also including and evaluating by drupal bootstrap every time. It increasing overhead for module_invoke_all() function. At last I would say, don't think twice and get uninstalled these modules because it unnecessary increasing overhead on db and slow down your site performance. Even this is not a good practice to keep unused module in site without uninstall.
For more info see following links.
In past I also faced this issue, I just uninstalled all disabled modules and ran update.php for all my contributed modules that help me to increase site performance.
I don't understand Jance's response. He says "it won't hurt", but then says these disabled modules are sucking up resources?
Saying inactive modules don't impact performance is not completely accurate... but it certainly is less important than the number of enabled modules.
While the hooks of an inactive module with code left in sites/all/modules aren't loaded when a specific form or page is loaded, all .info files from any code active or inactive are scanned when loading the admin/modules and admin/themes. Drush also scans all directories for Drush related includes in profiles and sites... regardless of what's active. Inactive modules aren't going to cause as much of a hit to CPU and memory as an enabled module, but having unused code in sites/all/modules isn't a good thing. Best practice would be to only install modules on a test site. Never install a module on a live site just to test it. Even when uninstalled, modules can leave a lot of cruft behind that can impact performance.
Modules that were once installed, but are now inactive could create tables and define variables add to the cruft at the database layer. Even if you uninstall the module, the uninstall process relies on the developers who wrote the module to clean up after themselves. Modules that use Features often leave even more cruft behind. Disabling a Feature "module" does not remove the content types, taxonomies, fields, views, blocks, etc that it created. Even uninstalling and deleting the code doesn't always clean up after a Feature.
I realize that not everyone can afford the type of dev -> test -> live workflow you get with a Drupal specific host like Acquia or Pantheon or has the technical skill to run a local version of their site, but if you don't have that type of testing environment be prudent about the modules you enable then uninstall.
Alas, hindsite is 20/20... for modules you've already enabled in the past that you've decided not to use, uninstall them and remove the code from sites/all any module. This won't improve performance as much as reducing the number of modules enabled, but leaving this code certainly won't help performance or your ability to maintain the site.
It won't hurt. Depending on how many modules you have, each time a given hook is fired off, all those modules maybe jumping in with unused functions.
Also, as your not using those modules, your probably not keeping them up to date, which would cause a security risk. It's also probably sucking your php memory. All good reasons to uninstall them if you aren't using them.