How feasible would it be for each page in the $pdf object to have a firstGroup and lastGroup property?
Yes, we will provide another property for such cases. However, we don't want to break API now and we need to keep the group property with some meaning.
As I mentioned, so far the consistency is winning for us. So we plan that group always represents the last group.
I can imagine some users would like to have the first group, for the page where are multiple groups.
In this case, I think they will have to use the extra property.
Bad dilema, I really don't know what is the mainstream here, so we will keep it consistent I think.
performance gain by "merge whole page" is significant.
Yes, that was done recently because of the performance gain