Bug 253417 - editors/neovim: Add LTO option
Summary: editors/neovim: Add LTO option
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Adam Weinberger
URL:
Keywords: feature, needs-qa, performance
Depends on:
Blocks:
 
Reported: 2021-02-10 21:31 UTC by Piotr Kubaj
Modified: 2021-02-16 15:25 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (adamw)


Attachments
patch (618 bytes, patch)
2021-02-10 21:31 UTC, Piotr Kubaj
no flags Details | Diff
patch (620 bytes, patch)
2021-02-10 22:52 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (adamw)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2021-02-10 21:31:59 UTC
Created attachment 222343 [details]
patch

This patch adds option for using LTO.
Comment 1 Adam Weinberger freebsd_committer freebsd_triage 2021-02-10 22:46:03 UTC
I'm certainly not opposed, but I'm just surprised that LTO would make much difference in a text editor that spends most of its time either IO-bound or waiting for keystrokes.

Do you find a noticeable change with this enabled?
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2021-02-10 22:52:33 UTC
Created attachment 222345 [details]
patch

Corrected patch.

I actually don't use neovim. I just noticed that FreeBSD ports in general have poor support for LTO and want to add support for that.

I think it actually might make a difference when used with large files.
Comment 3 Adam Weinberger freebsd_committer freebsd_triage 2021-02-10 23:03:47 UTC
It looks like neovim actually enables it by default:

CMakeLists.txt:
if (MINGW)
  # Disable LTO by default as it may not compile
  # See https://github.com/Alexpux/MINGW-packages/issues/3516
  # and https://github.com/neovim/neovim/pull/8654#issuecomment-402316672
  option(ENABLE_LTO "enable link time optimization" OFF)
else()
  option(ENABLE_LTO "enable link time optimization" ON)
endif()
Comment 4 Adam Weinberger freebsd_committer freebsd_triage 2021-02-16 15:25:39 UTC
I'm closing out this PR, as it looks like neovim already does this.