You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce a specific criteria for selecting one of many candidate invalidating patches during extension.
- For a set of patches who have the same intersection with the target subset definition and where that intersection is not a strict subset of any other intersections we know that exactly one of those patches will always be needed regardless of any other patch selections.
- From there pick the one that has the smallest transfer size.
- Here we use the ordering of a patch in the patch map as a signal for the relative transfer size of that patch.
- Lastly, update encoding guidance to recommend encoders order map entries by transfer size ascending.
During execution of the [$Extend an Incremental Font Subset$] algorithm in some cases it's necessary to select a single invalidating (full or partial)
699
+
patch entry from a list of candidate entries. The selection criteria used has a direct impact on the total number of round trips that will be needed to
700
+
perform the extension. Round trips are costly so for maximum performance patches should be selected in a way that minimizes the total number of needed
701
+
round trips.
702
+
703
+
The following selection criteria minimizes round trips and must be used by the client when selecting a single partial or full invalidation patch in step 7
704
+
of [$Extend an Incremental Font Subset$]:
705
+
706
+
1. For each candidate entry compute the set intersection between each subset definition in the entry and the target subset definition. Union
707
+
the resulting intersections together into a single subset definition.
708
+
709
+
2. Find an entry whose intersection subset definition from step 1 is not a strict subset of any other intersection subset definition.
710
+
711
+
3. Locate any additional entries that have the same intersection as the entry found in step 2. From the this set of entries (including the step 2 pick)
712
+
the final selection is the entry which is listed first in the patch map. For [[#patch-map-format-1]] this is the entry with the lowest entry index.
713
+
For [[#patch-map-format-2]] this is the entry that appears first in the [=Mapping Entries/entries=] array.
714
+
715
+
716
+
Note: a fast and efficient way to find an entry which satisfies the criteria for step 2 is to sort the entries (descending) by the size of the code point
717
+
set intersection, then the size of feature tag set intersection, and finally the size of the design space intersection. The first entry in this sorting is
718
+
guaranteed to not be a strict subset of any other entries, since any strict super sets would have to be at least one item larger. This approach also has
719
+
the added benefit that it selects the patch which will add the most data which the client is currently requesting.
@@ -2384,6 +2410,14 @@ A, B, C, and D. The patch table could list patches that add: A, B, C, D, A + B,
2384
2410
allow any two segments to be added in a single round trip. The downside to this approach is that it further increases the number of unique
2385
2411
patches needed.
2386
2412
2413
+
2414
+
<b>Entry order in encoded patch mappings</b>
2415
+
2416
+
In [[#invalidating-patch-selection]] the client uses the order of an entry in the patch map to break ties when selecting which patches to load and apply.
2417
+
Clients are aiming to reduce total transfer sizes so when multiple entries are tied in intersection size it's generally in the client's interest to choose
2418
+
the patch which has the smallest total transfer size. As a result encoders should place entries in the patch map ordered from smallest to largest size in
2419
+
bytes. This will ensure clients that when clients follow [[#invalidating-patch-selection]] they bias towards smaller patches and maximize performance.
2420
+
2387
2421
<b>Managing the number of patches</b>
2388
2422
2389
2423
Using [[#table-keyed]] patches along side a large number of segments can result in a very large number of patches needed, which can have two
0 commit comments