Skip to content

Commit

Permalink
Improve IronPython2 code completion performance (#15731)
Browse files Browse the repository at this point in the history
Co-authored-by: pinzart90 <[email protected]>
  • Loading branch information
dimven-adsk and pinzart90 authored Jan 9, 2025
1 parent c15bf76 commit c5e0f1a
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit c5e0f1a

Please sign in to comment.