don't create TIntArrayList(DEPTH_LIMIT) before we have clear indication that we might have a loop (parentId >= id)
avoid allocating sun.nio.cs.US_ASCII$Decoder when converting byte[] to String

: 1,267,720,880 (3%) bytes in 31,693,022 (3%) objects (avg size 40 bytes)
                 	sun.nio.cs.US_ASCII.newDecoder: 1,267,720,880 (100%) bytes in 31,693,022 (100%) objects
                 		java.lang.String.<init>: 1,267,673,560 (99%) bytes in 31,691,839 (99%) objects
                 			com.intellij.util.io.IOUtil.readUTFFast: 1,267,673,480 (99%) bytes in 31,691,837 (99%) objects