Batch provider CDN chunk retrieval
This commit is contained in:
parent
fd9e939b7b
commit
4733ac2719
2 changed files with 4 additions and 3 deletions
|
|
@ -616,9 +616,10 @@ namespace GameCult.Eve.UnityScene
|
||||||
{
|
{
|
||||||
var bytes = new byte[checked((int)manifest.SizeBytes)];
|
var bytes = new byte[checked((int)manifest.SizeBytes)];
|
||||||
var references = manifest.Chunks.OrderBy(chunk => chunk.Offset).ToArray();
|
var references = manifest.Chunks.OrderBy(chunk => chunk.Offset).ToArray();
|
||||||
for (var index = 0; index < references.Length; index += 2)
|
const int chunkBatchSize = 32;
|
||||||
|
for (var index = 0; index < references.Length; index += chunkBatchSize)
|
||||||
{
|
{
|
||||||
var batch = references.Skip(index).Take(2).ToArray();
|
var batch = references.Skip(index).Take(chunkBatchSize).ToArray();
|
||||||
var chunks = _snapshot!
|
var chunks = _snapshot!
|
||||||
.FetchDocumentsAsync<CultMeshCdnArtifactChunk>(
|
.FetchDocumentsAsync<CultMeshCdnArtifactChunk>(
|
||||||
recordKeys: batch.Select(reference => reference.RecordKey).ToArray(),
|
recordKeys: batch.Select(reference => reference.RecordKey).ToArray(),
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "org.gamecult.eve.unity-scene",
|
"name": "org.gamecult.eve.unity-scene",
|
||||||
"displayName": "Eve Unity Scene Lowering",
|
"displayName": "Eve Unity Scene Lowering",
|
||||||
"version": "0.3.7",
|
"version": "0.3.8",
|
||||||
"unity": "2021.3",
|
"unity": "2021.3",
|
||||||
"description": "Provider-agnostic Unity scene shell for gamecult.eve.surface.v1 interactive world surfaces.",
|
"description": "Provider-agnostic Unity scene shell for gamecult.eve.surface.v1 interactive world surfaces.",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
Reference in a new issue