PERF: countCycles doesn't respect options.depth
inspect can be slow with { depth = 1 } on large tables because countCycles still fully processes the whole table.
https://github.com/kikito/inspect.lua/blob/9c8a68da3033f1393b84b498313572654af82b8f/inspect.lua#L304-L314
cycles is only used to print the id before a table, but if the additional references aren't printed then the id isn't useful. Definitely doesn't seem worth the cost just to indicate that a value is referenced deeper inside the table. I had cases where inspect(t, { depth = 1 }) took 1000 ms but removing countCycles reduced it to 1 ms.
Hello, this could be a good optimisation for inspect. I cannot devote time to implement it right now, feel free to open a pull request