Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
34.59k stars 1.96k forks source link

[Git Sync] Diff before commit and the commit action itself are slow #6454

Open AyresMonteiro opened 1 year ago

AyresMonteiro commented 1 year ago

Expected Behavior

It would be possible to quickly do git diff of added/removed/modified request, as shown below. image

And it would be possible to quickly commit using the commit button: image

Actual Behavior

The diff takes a long time (about 10+ minutes) to finish: image

And commit button is also slow. It spin out for a long time before accomplish any commit.

Reproduction Steps

Just install Insomnia in debian-based linux and try to sync the repository using git.

Using a VM could be util.

Edit: other users reported the same error on Windows, so you can test it too. At the present date, the error was not reported in macOS.

Is there an existing issue for this?

Additional Information

There is another bug already reported in issue tracker by other people that I've found: git sync not working properly after project cloning.

To solve it I just reset my git sync setup and it started to work. Not properly (as mentioned above in this issue), but it started to work.

Insomnia Version

2023.5.6

What operating system are you using?

Ubuntu

Operating System Version

Mint 21 Vanessa

Installation method

Using dpkg alongside downloadable .deb in Insomnia site.

Last Known Working Insomnia version

No response

### Tasks
- [ ] Debug git sync slowness
- [ ] Fix git sync slowness
m1h43l commented 1 year ago

Diff and commit is extremely slow. Windows 10. Insomnia 2023.5.5

AyresMonteiro commented 1 year ago

Diff and commit is extremely slow. Windows 10. Insomnia 2023.5.5

Thanks for the reply! I removed the "[Linux]" tag from title due to knowing that the problem exists in other OS

mirket999 commented 1 year ago

It is crazy slow and doesn`t response most of the time, for me as well.

dbt-lucka commented 1 year ago

Can confirm, Windows 10

dimi-lcq commented 1 year ago

Look at this ticket, same problem ... https://github.com/Kong/insomnia/issues/3269

AyresMonteiro commented 1 year ago

Look at this ticket, same problem ... #3269

By the way, I saw that your ticket was from April 8th, 2021 and I was wondering in which version the bug was introduced or if it was always slow since the first version of Insomnia's git integration.

In addition, I never used git sync previously... I was using a version of Insomnia from 2020 before and there was not this git apparat, so I can't tell when the problem started.

bryangateley commented 11 months ago

Has anyone figured out where the source folders are for the repo when using git w/ insomnia? Wouldn't it be easier to just do all changes through the CLI? I tried looking for where the git repo is saved locally but was unable to.

AyresMonteiro commented 11 months ago

Has anyone figured out where the source folders are for the repo when using git w/ insomnia? Wouldn't it be easier to just do all changes through the CLI? I tried looking for where the git repo is saved locally but was unable to.

I know that there are some .db files that are probably used by Insomnia to handle its data.

Looking in the .config/Insomnia/ directory I've found this file insomnia.GitRepository.db but I didn't look it properly yet. When I'm not busy I'll try to figure out how this file is handled by Insomnia.