Skip to content

Slow import #13

@rashil2000

Description

@rashil2000

Import-Module Terminal-Icons command takes a usually 2-3 seconds, and therefore slows down the PowerShell load times when put in the '$PROFILE'. I'm on pretty beefy machine so hardware is not an issue.

Expected Behavior

It shouldn't take that long.

Current Behavior

The output of Measure-Command { Import-Module Terminal-Icons } is 'TotalMilliseconds : 2118.1497' for example.

Possible Solution

I think the culprit is the 'Terminal-Icons/Data/glyphs.ps1' file. It's too long and most of the nerd font icons aren't even used. To decrease load time we should source only those icons that are being used in the 'Terminal-Icons/Data/iconThemes/devblackops.psd1' file.

Context

PowerShell ends up taking too long to start, which hampers its usage.

Your Environment

  • Module version used: 0.1.1
  • Operating System: Windows 10.0.19041.0
  • PowerShell version: 5.1.19041.546

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions