View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0005537 | Spring engine | General | public | 2017-04-26 05:13 | 2018-11-17 02:08 | ||||
Reporter | gajop | ||||||||
Assigned To | gajop | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0005537: Changing modinfo.lua dependencies doesn't reset cache | ||||||||
Description | Changing the depends table in modinfo.lua should clear/force-update the cache for that archive and all depending on it. This isn't a new bug, it has been like this for as long as I can remember, and I'd like it to change. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|||||||||||
|
![]() |
|
silentwings (reporter) 2017-04-26 10:14 |
+1 |
Kloot (developer) 2017-04-26 12:26 Last edited: 2017-04-26 12:28 |
conflicting signals here, see 0003462 and 0004017. in any case both of you fine gents know C++, PR's welcome. |
abma (administrator) 2017-04-26 13:31 |
@gajop: i guess you are referencing to a modinfo.lua in a .sdd archive? |
gajop (developer) 2017-04-26 15:59 |
@Kloot: Uhh, I completely forgot about that. I know I had issues but don't remember it being fixed. Maybe I misinterpreted it being fixed or it was system specific. @abma: No, I don't think so. I'm talking about references (items in the modinfo.lua depend table) to other archives. They are of course modified in .sdd archives (I don't think anyone modifies .sdz/.sd7 archives, certainly not during development?). |
abma (administrator) 2017-04-26 16:10 |
possible renaming modinfo.lua to modinfo2.lua and rename it back could be a workarround. to fix this specific case the ArchiveScanner should check the time of modinfo.lua / mapinfo.lua, too. not sure if this has some drawbacks as well, checking all file timestamps IMHO is to slow. |
gajop (developer) 2017-04-26 16:11 |
My current workaround is to delete the cache each time. It seems to be "fast enough" as fast archive scanning is enabled by default. |
gajop (developer) 2018-11-10 18:39 |
Fix 987e6715ea6338182e418567d04fa58cc93a4d09 committed to cache_reload_fix branch: fix 0005537 ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua changes, and reparse the archive. This fixes issues like changing the depends subtable and not seeing any change until the cache dir is deleted. Implementation details: - We now cache an additional path to the modinfo.lua/mapinfo.lua and the related modified timestamp. This applies to datadirs (.sdd) archives only - This means that reading the cache will have two additional stat calls for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and there is no noticeable performance hit. Players are likely to have very few of such archives, probably 0. So unlikely to hurt performance in general. - Likewise, this information is only saved for datadirs as well, so there shouldn't be any performance hit on writing the cache either. - The way I obtain the full path of the archive is stolen from `CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with DRY. Also probably should be tested on windows, the "/" seems suspicious Minor: - INTERNAL_VAR is incremented - CheckCachedData signature is modified to pass modifiedTime by reference as it cannot be nullptr - internalver is loaded as lowercase (consistent to how its saved), repo: spring changeset id: 11121 |
gajop (developer) 2018-11-17 01:30 |
Fix ddf6a04ab93ec89d9cb1a38b303a4e75a5b7cd93 committed to cache_reload_fix branch: fix 0005537 ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua changes, and reparse the archive. This fixes issues like changing the depends subtable and not seeing any change until the cache dir is deleted. Implementation details: - We now cache an additional path to the modinfo.lua/mapinfo.lua and the related modified timestamp. This applies to datadirs (.sdd) archives only - This means that reading the cache will have two additional stat calls for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and there is no noticeable performance hit. Players are likely to have very few of such archives, probably 0. So unlikely to hurt performance in general. - Likewise, this information is only saved for datadirs as well, so there shouldn't be any performance hit on writing the cache either. - The way I obtain the full path of the archive is stolen from `CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with DRY. Also probably should be tested on windows, the "/" seems suspicious Minor: - INTERNAL_VAR is incremented - CheckCachedData signature is modified to pass modifiedTime by reference as it cannot be nullptr - internalver is loaded as lowercase (consistent to how its saved), repo: spring changeset id: 11146 |
gajop (developer) 2018-11-17 02:07 |
Fix 6e2a739d632f46d911ad6ea6c01ff839f7927a12 committed to develop branch: fix 0005537 ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua changes, and reparse the archive. This fixes issues like changing the depends subtable and not seeing any change until the cache dir is deleted. Implementation details: - We now cache an additional path to the modinfo.lua/mapinfo.lua and the related modified timestamp. This applies to datadirs (.sdd) archives only - This means that reading the cache will have two additional stat calls for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and there is no noticeable performance hit. Players are likely to have very few of such archives, probably 0. So unlikely to hurt performance in general. - Likewise, this information is only saved for datadirs as well, so there shouldn't be any performance hit on writing the cache either. - The way I obtain the full path of the archive is stolen from `CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with DRY. Also probably should be tested on windows, the "/" seems suspicious Minor: - INTERNAL_VAR is incremented - CheckCachedData signature is modified to pass modifiedTime by reference as it cannot be nullptr - internalver is loaded as lowercase (consistent to how its saved), repo: spring changeset id: 11147 |
gajop (developer) 2018-11-17 02:08 |
Fix 62297f4db1f102337be34eff97162c7f87919414 committed to maintenance branch: fix 0005537 ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua changes, and reparse the archive. This fixes issues like changing the depends subtable and not seeing any change until the cache dir is deleted. Implementation details: - We now cache an additional path to the modinfo.lua/mapinfo.lua and the related modified timestamp. This applies to datadirs (.sdd) archives only - This means that reading the cache will have two additional stat calls for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and there is no noticeable performance hit. Players are likely to have very few of such archives, probably 0. So unlikely to hurt performance in general. - Likewise, this information is only saved for datadirs as well, so there shouldn't be any performance hit on writing the cache either. - The way I obtain the full path of the archive is stolen from `CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with DRY. Also probably should be tested on windows, the "/" seems suspicious Minor: - INTERNAL_VAR is incremented - CheckCachedData signature is modified to pass modifiedTime by reference as it cannot be nullptr - internalver is loaded as lowercase (consistent to how its saved), repo: spring changeset id: 11148 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2017-04-26 05:13 | gajop | New Issue | |
2017-04-26 10:14 | silentwings | Note Added: 0017513 | |
2017-04-26 12:25 | Kloot | Relationship added | has duplicate 0003462 |
2017-04-26 12:25 | Kloot | Relationship added | duplicate of 0004017 |
2017-04-26 12:26 | Kloot | Note Added: 0017514 | |
2017-04-26 12:28 | Kloot | Note Edited: 0017514 | View Revisions |
2017-04-26 13:31 | abma | Note Added: 0017518 | |
2017-04-26 15:59 | gajop | Note Added: 0017526 | |
2017-04-26 16:10 | abma | Note Added: 0017528 | |
2017-04-26 16:11 | gajop | Note Added: 0017529 | |
2018-11-10 18:38 | gajop | Changeset attached | => spring cache_reload_fix 4eff6e2a |
2018-11-10 18:38 | gajop | Assigned To | => gajop |
2018-11-10 18:38 | gajop | Status | new => resolved |
2018-11-10 18:38 | gajop | Resolution | open => fixed |
2018-11-10 18:39 | gajop | Changeset attached | => spring cache_reload_fix 987e6715 |
2018-11-10 18:39 | gajop | Note Added: 0019508 | |
2018-11-17 01:30 | gajop | Changeset attached | => spring cache_reload_fix ddf6a04a |
2018-11-17 01:30 | gajop | Note Added: 0019557 | |
2018-11-17 02:07 | gajop | Changeset attached | => spring develop 6e2a739d |
2018-11-17 02:07 | gajop | Note Added: 0019558 | |
2018-11-17 02:08 | gajop | Changeset attached | => spring maintenance 62297f4d |
2018-11-17 02:08 | gajop | Note Added: 0019559 |