[ 
https://issues.apache.org/jira/browse/SLING-10118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17330416#comment-17330416
 ] 

Thierry Ygé commented on SLING-10118:
-------------------------------------

[~bdelacretaz] the current implementation is not fully caching the GraphQL 
Schema, only the first part is cached, then it need to inject the resource , to 
finally get the schema object ready to be used (execute or validate). Wiring 
resource is the term used in (1).

This PR aim to fully cache it, so that we gain the extra time it needs to build 
the schema (which grows linearly with the size of the SDL).

(1) 
https://github.com/apache/sling-org-apache-sling-graphql-core/blob/master/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L375

> Fully cache GraphQLSchema
> -------------------------
>
>                 Key: SLING-10118
>                 URL: https://issues.apache.org/jira/browse/SLING-10118
>             Project: Sling
>          Issue Type: Bug
>          Components: GraphQL
>    Affects Versions: GraphQL Core 0.0.10
>            Reporter: Thierry Ygé
>            Priority: Major
>
> Currently in SLING-10085 the GraphQLSchema couldn't be cached due to wired 
> resource.
> Thus it still need half the time to spend on building the schema, while 
> generally the resource is only used to be passed later to the fetcher. As 
> that resource then change, I suggested to wrap it via a proxy Resource 
> implementation that would be passed instead of the real resource.
> That proxy will then use a map  to lookup for the current resource used at 
> execute/validate time. The key for the map is to use the current thread.
> I will submit a PR with the solution I suggest to use.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to