Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve IronPython2 code completion performance #15731

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/Libraries/PythonNodeModelsWpf/IronPythonCompletionData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ internal static CompletionType ConvertCompletionType(ExternalCodeCompletionType

internal IronPythonCompletionData(IExternalCodeCompletionData data)
{
this.Text = data.Text;
this.Description = data.Description;
Text = data.Text;

BuildCompletionTypeToIconMap();

Image = TypeToIcon[ConvertCompletionType(data.CompletionType)];

description = new Lazy<string>(() => data.Description);
}

public System.Windows.Media.ImageSource Image { get; }

public string Text { get; private set; }

public string Stub { get; private set; }
Expand All @@ -72,7 +72,8 @@ public object Content
get { return Text; }
}

public object Description { get; private set; }
private readonly Lazy<string> description = null;
public object Description => description?.Value ?? "";


public double Priority { get { return 0; } }
Expand Down
Loading