Currently, the hard link detection iterates over all inodes linearly, and inside that loop iterates over all previous nodes to find one with the same inode number. This scales quadratically with larger SquashFS images and makes sqfs2tar and rdsquashfs hang for a very long time for any sufficiently large image.
The problem is, we cannot directly use the inode numbers as table indices, because they are untrusted and may be larger than what the super block told us. It should be pretty straight forward to replace the linear search with a hash table.
Currently, the hard link detection iterates over all inodes linearly, and inside that loop iterates over all previous nodes to find one with the same inode number. This scales quadratically with larger SquashFS images and makes sqfs2tar and rdsquashfs hang for a very long time for any sufficiently large image.
The problem is, we cannot directly use the inode numbers as table indices, because they are untrusted and may be larger than what the super block told us. It should be pretty straight forward to replace the linear search with a hash table.