{"action":"created","issue":{"url":"https://api.github.com/repos/Esri/cluster-layer-js/issues/12","labels_url":"https://api.github.com/repos/Esri/cluster-layer-js/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/Esri/cluster-layer-js/issues/12/comments","events_url":"https://api.github.com/repos/Esri/cluster-layer-js/issues/12/events","html_url":"https://github.com/Esri/cluster-layer-js/issues/12","id":62502840,"number":12,"title":"Explore ways to not query for every feature","user":{"login":"steveoh","id":325813,"avatar_url":"https://avatars.githubusercontent.com/u/325813?v=3","gravatar_id":"","url":"https://api.github.com/users/steveoh","html_url":"https://github.com/steveoh","followers_url":"https://api.github.com/users/steveoh/followers","following_url":"https://api.github.com/users/steveoh/following{/other_user}","gists_url":"https://api.github.com/users/steveoh/gists{/gist_id}","starred_url":"https://api.github.com/users/steveoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveoh/subscriptions","organizations_url":"https://api.github.com/users/steveoh/orgs","repos_url":"https://api.github.com/users/steveoh/repos","events_url":"https://api.github.com/users/steveoh/events{/privacy}","received_events_url":"https://api.github.com/users/steveoh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-17T19:56:05Z","updated_at":"2015-05-22T19:04:09Z","closed_at":null,"body":"https://github.com/Esri/cluster-layer-js/blob/master/src/clusterfeaturelayer.js#L470-L483\r\n````js\r\n                if (uncached.length > this._returnLimit) {\r\n                    while(uncached.length) {\r\n                        // Improve performance by just passing list of IDs\r\n                        this._query.objectIds = uncached.splice(0, this._returnLimit - 1);\r\n                        queries.push(this.queryTask.execute(this._query));\r\n                    }\r\n                    all(queries).then(lang.hitch(this, function(res) {\r\n                        var features = arrayUtils.map(res, function(r) {\r\n                            return r.features;\r\n                        });\r\n                        this._onFeaturesReturned({\r\n                            features: merge(features)\r\n                        });\r\n                    }));\r\n````\r\n\r\nreally puts the rage on an arcgis server that has more than a good demos worth of features. I sort of figured that `returnLimit` would act on a feature layer's virtual grid instead of doing snap shot style spin up a query task to download every feature - In our case being 15mb's gzipped. Should this cluster layer inherit from FeatureLayer to get access to the virtual grid instead of graphics layer? \r\n\r\nIn the future there is going to have to be server side point clustering to handle these scenarios. Are you in the loop enough to know if that is on the right peoples radar?"},"comment":{"url":"https://api.github.com/repos/Esri/cluster-layer-js/issues/comments/104744748","html_url":"https://github.com/Esri/cluster-layer-js/issues/12#issuecomment-104744748","issue_url":"https://api.github.com/repos/Esri/cluster-layer-js/issues/12","id":104744748,"user":{"login":"odoe","id":206462,"avatar_url":"https://avatars.githubusercontent.com/u/206462?v=3","gravatar_id":"","url":"https://api.github.com/users/odoe","html_url":"https://github.com/odoe","followers_url":"https://api.github.com/users/odoe/followers","following_url":"https://api.github.com/users/odoe/following{/other_user}","gists_url":"https://api.github.com/users/odoe/gists{/gist_id}","starred_url":"https://api.github.com/users/odoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoe/subscriptions","organizations_url":"https://api.github.com/users/odoe/orgs","repos_url":"https://api.github.com/users/odoe/repos","events_url":"https://api.github.com/users/odoe/events{/privacy}","received_events_url":"https://api.github.com/users/odoe/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T19:04:09Z","updated_at":"2015-05-22T19:04:09Z","body":"Maybe a `hardLimit` property that would limit queries in each pass? With tons of points like wouldn't even a virtual grid chew up the requests? I like your solution @steveoh. It wouldn't be too difficult to set the layer up so that if it was provided the data, not to make the HTTP requests."}}