Skip to content

Conversation

@KevinRansom
Copy link
Contributor

This function

type AssemblyReference = 
    member x.SimpleAssemblyNameIs(name) = 

calls fileNameWithoutExtension which in turn calls checkPathForIllegalChars. However, x.SimpleAssemblyNameIs only uses the result of fileNameWithoutExtension to compare with a passed in Value name.

So there is no real reason for validating that fileNameWithoutExtension has illegal chars, since it will just fail to match the name.

This reduces the number of calls from

checkPathForIllegalCharsCalls : {contents = 947;}
fileNameWithoutExtensionCalls : {contents = 745;}

down to

checkPathForIllegalCharsCalls : {contents = 203;}
fileNameWithoutExtensionCalls : {contents = 745;}

@vasily-kirichenko
Copy link
Contributor

< 1000 calls?...

@KevinRansom
Copy link
Contributor Author

@vasily-kirichenko yes less than 1000 invocations when compiling fsharp.core.dll using the open source build.

@vasily-kirichenko
Copy link
Contributor

It would be more interesting to collect number of calls during editing a file for some time.

@dsyme
Copy link
Contributor

dsyme commented Oct 28, 2016

The code looks fine

@KevinRansom KevinRansom merged commit ca5eadb into dotnet:master Oct 28, 2016
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.

4 participants