Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1167 closed enhancement (fixed)

[PATCH] Improve COLLADA caching and add to archive builder

Reported by: historic_bruno Owned by: ben
Priority: Should Have Milestone: Alpha 9
Component: Core engine Keywords: collada, archive
Cc: Patch:

Description

Problems solved in this patch:

  • Modifying skeletons.xml should invalidate the model/animation cache, since the COLLADA converter depends on it for skeletal models, this will reduce modeling confusion
  • CColladaManager uses a weird old caching technique, it should use CCacheLoader instead, with hash keyed on skeletons.xml and converter version. Also essential for using archive builder
  • Archive builder should convert DAEs like it does textures and XML, this will give a slight performance boost and smaller release download, but the main benefit is not requiring the COLLADA converter
    • Note: it skips over broken DAEs, these would trigger errors if used in the game anyway, so there's no advantage in archiving them
  • Fixes archive builder on Windows, there was a minor OS path separator issue when mounting the archive cache

Attachments (1)

colladacache+archivebuild_fixes-02172012.patch (19.1 KB ) - added by historic_bruno 12 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by historic_bruno, 12 years ago

By the way, public.zip size decreased from 699MB to 602MB by converting the DAEs, not bad :)

comment:2 by Philip Taylor, 12 years ago

In the patch, CColladaManager::PrepareCacheKey hashes COLLADA_CONVERTER_VERSION then returns version = 1. Instead, it should not hash the version explicitly and should return version = COLLADA_CONVERTER_VERSION (since that's the point of the version return value).

The almost-complete duplication of the PMD/PSA cases in ArchiveBuilder seems a bit inelegant. Maybe merge them together, like with (very roughly) "if (extension == ".dae") { FileType type; if (starts_with("art/meshes/")) type = PMD; else if ("art/animation/") type = PSA; else { AddPath(realPath); continue; } ...do the conversion... }"?

Otherwise looks good.

comment:3 by ben, 12 years ago

Owner: set to ben
Resolution: fixed
Status: newclosed

In 11100:

Improves CColladaManager caching behavior: skeletons.xml changes now invalidate cached .pmd/psa files, CCacheLoader is used for consistency, adds support for archived files. Fixes #1167.
Adds COLLADA conversion to archive builder.
Fixes archive builder on Windows.
Moves error logging from CCacheLoader::TryLoadingCached to its callers, because this failure can be legitimate (in the case of uncached .pmd/psa files).

comment:4 by historic_bruno, 12 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.