Attached is a patch to eliminate unnecessary checks for matching clients/frames in `server-handle-delete-frame' and `server-kill-emacs-query-function'. Previously, `server-handle-delete-frame' would iterate over all frames to check if there were any other frames associated with the current client. Now, it uses `seq-some' to stop iterating once it finds the first such frame. Similarly, `server-kill-emacs-query-function' used to iterate over all clients, and then all buffers for *each* client to check if there were any live buffers associated with any clients. Now, it uses a pair of calls to `seq-some' to stop iterating once it finds a live buffer from any client. I haven't benchmarked these changes since I hope the strategy of stopping iteration as soon as we can is uncontroversial. However, if you think it's important, I can try to generate some benchmarks.