Re: [webcomponents]: de-duping in HTMLImports

On Tue, Apr 9, 2013 at 2:42 PM, Scott Miles <sjmiles@google.com> wrote:
> Duplicate fetching is not observable, but duplicate parsing and duplicate
> copies are observable.
>
> Preventing duplicate parsing and duplicate copies allows us to use 'imports'
> without a secondary packaging mechanism. For example, I can load 100
> components that each import 'base.html' without issue. Without this feature,
> we would need to manage these dependencies somehow; either manually, via
> some kind of build tool, or with a packaging system.
>
> If import de-duping is possible, then ideally there would also be an
> attribute to opt-out.
>
> Scott
>
>
> On Tue, Apr 9, 2013 at 11:08 AM, Dimitri Glazkov <dglazkov@google.com>
> wrote:
>>
>> The trick here is to figure out whether de-duping is observable by the
>> author (other than as a performance gain). If it's not, it's a
>> performance optimization by a user agent. If it is, it's a spec
>> feature.
>>
>> :DG<
>>
>> On Tue, Apr 9, 2013 at 10:53 AM, Scott Miles <sjmiles@google.com> wrote:
>> > When writing polyfills for HTMLImports/CustomElements, we included a
>> > de-duping mechanism, so that the same document/script/stylesheet is not
>> > (1)
>> > fetched twice from the network and (2) not parsed twice.
>> >
>> > But these features are not in specification, and are not trivial as
>> > design
>> > decisions.
>> >
>> > WDYT?
>> >
>> > Scott
>> >
>
>

For what it is worth, I think I might have opened a bug on this
already (long ago) - but it would have been mixed in with a larger
'how to load them'...

--
Brian Kardell :: @briankardell :: hitchjs.com

Received on Tuesday, 9 April 2013 20:17:56 UTC