That is where you as a programmer come in. You can be lazy and e.g. do a container.refresh which will refresh everything within the container. However, your app will be a lot faster if e.g. in your container, you only changed a labels text and in so only do a label.refresh. If everything was changed in the container, then doing a container.refresh does make sense. Updating .text and .visibility do need a refresh (although 4.32 has a .SetVisibilityFlush() method). Really depends on how your app is constructed.
As for a showmodal, this does indeed a full refresh of everything in it (because in some cases it needs to run internal Javascript which was did not run when it was created).