Do not let Drupal handle 404's on development environment Drupal handles 404 error pages, but on localhost that can be very annoying, especially if you have missing assets (such as uploaded images). For each image, CSS and such that is not found, a drupal is bootstrapped and ran.

How can one best disable this? 

Removing the line ErrorDocument 404 /index.php from .htaccess gives no change. Should that work?

Changing it to ErrorDocument 404 "development not found" does not work either.
Newer versions of Drupal have an addition to settings.php so that it doesn't handle the 404 for certain assets:

$conf['404_fast_paths_exclude'] = '/\/(?:styles)\//';
$conf['404_fast_paths'] = '/\.(?:txt|png|gif|jpeg|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
$conf['404_fast_html'] = '&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;head&gt;&lt;title&gt;404 Not Found&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;Not Found&lt;/h1&gt;&lt;p&gt;The requested URL "@path" was not found on this server.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;';


There are comments in the file that explain these new options some more.

You can also edit the .htaccess to disable the ErrorDocument and then put some ErrorCond directives in to prevent missing files from being punted to index.php:



RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_URI} !files/foo/(.*)\.bar$
RewriteRule ^ index.php [L]