mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-23 00:08:14 +03:00
Merge pull request #2117 from unisonweb/fix/server-performance-bug
Fix possible quadratic performance bug in Backend.hs
This commit is contained in:
commit
becea9aef4
@ -557,21 +557,19 @@ prettyDefinitionsBySuffixes relativeTo root renderWidth suffixifyBindings codeba
|
||||
termFqns :: Map Reference (Set Text)
|
||||
termFqns = Map.mapWithKey f terms
|
||||
where
|
||||
f k _ =
|
||||
R.lookupRan (Referent.Ref' k)
|
||||
. R.filterDom (\n -> "." `Text.isPrefixOf` n && n /= ".")
|
||||
rel = R.filterDom (\n -> "." `Text.isPrefixOf` n && n /= ".")
|
||||
. R.mapDom Name.toText
|
||||
. Names.terms
|
||||
$ currentNames parseNames
|
||||
f k _ = R.lookupRan (Referent.Ref' k) rel
|
||||
typeFqns :: Map Reference (Set Text)
|
||||
typeFqns = Map.mapWithKey f types
|
||||
where
|
||||
f k _ =
|
||||
R.lookupRan k
|
||||
. R.filterDom (\n -> "." `Text.isPrefixOf` n && n /= ".")
|
||||
rel = R.filterDom (\n -> "." `Text.isPrefixOf` n && n /= ".")
|
||||
. R.mapDom Name.toText
|
||||
. Names.types
|
||||
$ currentNames parseNames
|
||||
f k _ = R.lookupRan k rel
|
||||
flatten = Set.toList . fromMaybe Set.empty
|
||||
mkTermDefinition r tm = do
|
||||
ts <- lift (Codebase.getTypeOfTerm codebase r)
|
||||
|
Loading…
Reference in New Issue
Block a user