Add efficient graph update logic (untested)