jwikman / nab-al-tools

The code repository for NAB AL Tools, an AL tool for VS Code
https://marketplace.visualstudio.com/items?itemName=nabsolutions.nab-al-tools
MIT License
19 stars 7 forks source link

"Find next untranslated text" is very slow #429

Open FranckCovens opened 1 year ago

FranckCovens commented 1 year ago

Describe the bug "NAV:Find next untranslated text" after writing a translation is very slow My translation file is quite heavy : 7118 KB. Appears late in 2022 (maybe november). It wasn't a gradual slowdown. I figure an update is responsible of this issue. Find next is still fast if no modification is done.

Versions used VSCode: 1.74.1 NAB AL Tools: 1.28.0 Release - v1.29.211111600 pre-release

To Reproduce Steps to reproduce the behavior:

  1. F1
  2. "NAV:Find next untranslated text"
  3. Enter (fast search)
  4. F1 "NAV:Find next untranslated text"
  5. Enter (fast search)
  6. F1
  7. "NAV:Find next untranslated text"
  8. Write translation
  9. F1
  10. "NAV:Find next untranslated text"
  11. Enter : slow search (3-4 seconds)

Expected behavior Previously the command was fast, even if translation was made

Screenshots not applicable

Additional context

jwikman commented 1 year ago

Hi @FranckCovens,

Yes, that was a quite heavy xlf file! I haven't tested that large xlf files, and frankly - that was not the xlf file in mind when we built this feature. 😉

But if we can find out what is causing this, we might be able to improve your experience.

Can you please try to find out in which version of NAB AL Tools that this slowdown happened? You can do that in VSCode by selecting the gear on the extension, select "Install Another Version..." and then you select an old version image image

If you can help us identify between which two versions it became slow - we might be able to help you out.

FranckCovens commented 1 year ago

Hi @jwikman,

Surely since 1.28.0. Previous versions are too old.

I found a trick but it is not very practical :

F1 / Find untranslated text [List appears on side tab] Clicking on the line takes us directly to the place concerned. CTRL + Page Down to activate xliff tab.

Franck

jwikman commented 1 year ago

Did you test v1.26.0 now, with the same file? I interpret your reply as if you are assuming that it works fast in v1.26.0, but we need to be sure that running v1.26.0 with the same large file is faster. Otherwise we might be chasing ghosts. 😅

jwikman commented 1 year ago

@FranckCovens one thing that you might want to test is to set the setting "NAB.ShowXlfHighlights" to false, since it is executing several Regular Expressions on the xlf content.