It depends on what you mean by "go through the list of items on the map" - there's checks for updating temperature, increasing item age (and applying stuff like rot and possibly also fire damage), generating hauling jobs, and other various operations, and those are all done on completely separate intervals (and I believe some have the same interval but different offsets). Changing those isn't as simple as you might think.
Even if they could be changed, how exactly would you define "when necessary"?
If you really want to reduce FPS drop related to large item counts, then just destroy the extra items so the game doesn't have to deal with them - we already have "autodump" to do that with garbage, and (as angavrilov mentioned in a post earlier) it should also be possible to 'free up' the items used by constructions.
[edit] I've just written a new plugin (which will be called "cleanconst") which gets rid of construction materials and marks them to be recreated on disassembly.
By go through all the items on the map, I mean run a search through every single one for something or to edit something.
"When necessary" is defined as:
-When you look through the items with "look" or on the stocks screen (maybe).
-When a dwarf or other creature gets a job that requires an item.
-When you want to build something.
-After a certain interval, to calculate age and rotting and so on.
The "hack" to reduce the search interval is related to the last one.
When creatures look for items to carry out jobs, the check needs to be done but these events are not frequent enough to cause massive FPS decay on the scale that we are seeing.
The idea is to ensure the check for ageing and decay is only carried out every few ticks, i.e. once per day or once per week depending on how much you have in the game. The interval set depends on personal preferences and the state of FPS for the user. While the interval should be user-defined, but I am OK with increasing the length of time to say, 10x what it is now just to start out with. I know this will change the way the game behaves, but it will be a good compromise to keep the game playable.
If we have to keep the item count as low as it needs to be now, we keep ending up with trouble playing forts longer than ten years. If we even get to ten years, or five years, that is.