The shards have to be populated in order and they are also generated lazily to save time as not all shards may be needed. This class also supports concurrent access by multiple threads as follows.
At most only one shard can be being populated at once, this is a direct consequence of the fact that shards must be populated in order.
Once a shard has been populated it can be output concurrently by multiple threads.
If there is only a single dissectable area within a page then by definition a dissectable area's content must exceed its available space otherwise the page is in error as the fixed size exceeds the device limit.
If however there are multiple dissectable areas within the page then it is possible that even though the total cost of the page exceeds the device limit the cost of the contents of a dissectable area do not exceed its available space.
In this case we need to explicily calculate the cost of the dissectable areas contents (without taking into account the dissection overhead) so that we can check whether we need to dissect or not. If we do not do this then it is possible that reducing the available space by the dissection overhead would be enough to cause dissection to occur.
At the moment this will not be implemented as it is an extreme case but it will almost certainly need addressing in future. todo: Address the above issue.
|
|
|
|
|
|
|
|