Recently, I came across an article stating that setInterval is considered to be CPU intensive. To verify this claim, I developed a script utilizing setInterval and closely monitored the CPU usage. Surprisingly, I did not observe any significant changes in the CPU performance. This has led me to question if there might be something crucial that I overlooked.
The script essentially performs periodic checks for alterations in the URL hash (the content appearing after #) every 100 milliseconds. If a change is detected, it triggers a page load through AJAX. However, if no changes are identified, the script remains idle. Considering this operation, could there potentially be any concerns regarding CPU resources?