Skip to content

Conversation

@dsyme
Copy link
Contributor

@dsyme dsyme commented Nov 22, 2018

This change means that only a ByteFile for the metadata section is kept after cracking DLLs in the ILModuleReader used in type providers.

We should also adjust the PEReader so it doesn't read all bytes, so those are ephemeral

Expected benefit is about 50% reduction in memory usage by TPs built using the TPSDK (since referenced assemblies make up most of the memory usage)

@cartermp
Copy link
Contributor

Expected benefit is about 50% reduction in memory usage by TPs built using the TPSDK (since referenced assemblies make up most of the memory usage)

Let's verify this with a real-world solution (cc @blumu)

@dsyme
Copy link
Contributor Author

dsyme commented Nov 22, 2018

@TIHan I realise now how horrific the previous caching was - comparing full file contents after doing a ReadAllBytes. This PR contains an improvement to at least use GetLastWriteTimeUtc for the comparison and only later call ReadAllBytes if necessary https://github.com/fsprojects/FSharp.TypeProviders.SDK/pull/284/files#diff-7c540ae6a67f14c48d0403e7b021fc86R6646

We sill should move to a non-weak cache though

@dsyme dsyme merged commit 3a934e2 into fsprojects:master Nov 22, 2018
@dsyme
Copy link
Contributor Author

dsyme commented Nov 23, 2018

@TIHan I've merged this, please integrate and then validate the overall effect of this combined with the stronger cache from #283

@blumu
Copy link

blumu commented Nov 26, 2018

@TIHan shared with me a private build of FSharp.Data built with #283. I am testing it with our "real-word" solution and will update this thread with results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants