Proper tree diffing is a really hard (I would say unsolved) problem. The "standard" algorithm is O(N^4)!