Skip to content

Smarter lazy-loading. #11

Description

@lgalke

Hey @bdauria ,

I just opened a pull request regarding the K command.
During the creation of the pull request I noticed some inconsistency:

While I set the keyword prg option locally, the commands are provided globally.
And we reinitialise them even if they were already initialised. Depending on how the angular_cli#init() method is called, that may produces unnecessary overhead.

Now there are two possible solutions:

  1. Include -buffer in all command declarations. That means that the commands are loaded once again for each buffer, but at least.only for the specific buffer, so that they do not clutter global namespace.

  2. Inside angular_cli#init(): check if global initialisation has already been done, e.g. by g:angular_cli_did_init. Then, the commands are only initialised once and globally.

What would be your preferred solution?

Best,
Lukas

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions