Closed akinsho closed 2 years ago
There are 3 main sections when running require:
resolve
: time it took to find the module in the search pathload
: time to load the file into the VMexec
: time to execute the moduleThe sum of these is the total time to require. However, the profiler excludes sub-requires of a module since if that sub-module is required by another module, then the second require cost will be significantly lower, so to make the profiler useful we exclude these. This means the profiler results shouldn't be effected by module load order.
I'm not sure how the above connects to this issue exactly tbh, wilder.nvim requires lua-fzy-native
here, from what you are saying this plugin excludes sub-requires by which I guess you mean require'module.submodule'
except in this case that's not how the fzy module is required, instead it is required via the main module require'lua-fzy-native'
and has no submodules being used by wilder.
Is this still an issue?
Ah sorry I forgot this was still open. I actually no longer use wilder and don't use the profiling functionality anymore either. So I'm not sure. Last I checked which was quite a while ago. It was still an issue but it's not a setup I use anymore so I can close this out since it's not something I'm still reporting
Hi,
When requiring https://github.com/romgrk/fzy-lua-native the following error is thrown, it appears there is an assertion on that line
assert(pb.exec > 0)
which fails.This issue began a few weeks/commits ago but previously worked an is only visible when
impatient.enable_profile()
is used otherwise it doesn't occur.For context this plugin is being used by
wilder.nvim
which internally is requiringfzy-lua-native
I don't know entirely but it seems like the
fzy-native
package probably doesn't have the same setup as other modules and so this check doesn't apply for it. I don't know whatexec
is supposed to be but is seems like maybe a package should be skipped if doesn't have one.