What's the difference between environment.etc and home.files in home-manager?

They have the same purpose but the implementation are different.

environment.etc links files from nix store to /etc/static then to /etc. When the files are changed, the /etc/static is updated first, then the whole /etc is scanned to remove dangling symlinks.

I’m not sure how home-manager does this but I thought it’s different. I test the environment.etc method on /home and it takes several minutes to scan the files.

So my question is: Why does environment.etc use such a method? How does home-manager do this? What’s the difference?