rewe-digital / composer

Dynamically composes markup generated by microservices. Based on Java8, reactive patterns and Spotify Apollo. Made with 💙 in cologne.
Apache License 2.0
10 stars 2 forks source link

Add a shortcut for templates/sub-parts containg no includes to skip parsing #21

Open AndreasKl opened 6 years ago

AndreasKl commented 6 years ago

As an optimization it would be nice if a template does not contain any includes, can indicate that the content can be passed straight into the result with no parsing at all (ignoring the the content tag) Also includes that have no need for a "content"-tags and does not need any parsing could indicate that. This could be useful for json objects for analytics. <c-include path="..." mode="parse/**pipe**"></c-include>

thovid commented 6 years ago

So, a content fragment could decide to just return the <div>...</div> with the content, without head etc?

thovid commented 6 years ago

Btw, html pages can skip parsing by being routed to via a proxy route ;-)

AndreasKl commented 6 years ago

@thovid at least an include is always processed which is potentially not always needed. I could think of a service that renders a script tag with a few javascript variables.