Having 4K files in a single directory in an ext3 filesystem should not result in any performance issues. Technically, I believe that there are no hard limits as to how many files you can put into a single directory, but once you get to 5 digits (eg, >10,000 files) regardless of whether the computer can handle it not, the human cannot.
With 4000 files, you may want to break things up into alphabetical order, eg, A-G, H-M, N-S, T-Z. Not for the computer's sake, but to make it easier for your users
|