The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming. (Donald Knuth)
As sensible as it would be to eliminate or severely restrict the term of many patents, that's not likely to happen. However, there will come a time when just about everything reaches its zenith. Kurzweil famously thinks that will happen in artifical intelligence around 2045. I think he is wildly optimistic and expect to have no chance of seeing that in my lifetime - unless medical technology approaches its own singularity before then and my lifetime is greatly extended!
But both of those fields (AI and health) illustrate my point. There is a zenith or singularity for both. For AI, it's machines that can design smarter machines and for medicine, it's full understanding of cellular biology to the point of being able to achieve immortality and perfect health. Whether in 2045 or centuries later, it seems very foolish to bet against either one. They will reach the point where further improvement is not possible.
Aside from all the other difficulties attendant with such advances, how does capitalism survive that? Presumably patents will protect much or all of this initially, but patents do eventually expire. Nor will other technology be standing still: we have the beginnings of 3D printing now; the logical conclusion of that technology is a machine that can make anything at all. That too will be patented, but eventually that also expires. So here we are, some unknown number of years from now, with many, many things having reached their ultimate stage and no longer protected by patents.