Giter VIP home page Giter VIP logo

Comments (6)

raxod502 avatar raxod502 commented on July 17, 2024 5

My current workaround is to just disable the listing of buffers in the file selection menu, i.e. (setq projectile-switch-project-action #'counsel-projectile-find-file). This also prevents the crippling lag that crops up due to checking the project of all the buffers I have open.

from counsel-projectile.

ericdanan avatar ericdanan commented on July 17, 2024 2

The issue should be solved now, please let me know if it is not. There is still an issue of counsel-projectile being slow that I will have to look into though.

from counsel-projectile.

ericdanan avatar ericdanan commented on July 17, 2024 1

FYI, I improved the performance of counsel-projectile, it should be about as fast as counsel-projectile-find-file now except for very lare projects with a lot of open buffers.

from counsel-projectile.

ericdanan avatar ericdanan commented on July 17, 2024

Thanks for reporting this issue. It appeared after commit bbatsov/projectile@72a8be5 in projectile.

Before this commit, projectile called the switch project action from a temp buffer with default-directory let-bound to the project to switch to. After the commit it is no longer the case: the action is now called from the buffer from which you switch project, with default-directory let-bound to the new project in this buffer. Hence while switching, the initial buffer is incorrectly considered as belonging to the new project, as you guessed.

Actually the commit above was more or less restoring projectile's former behavior. The temp buffer thing had been introduced by pull request bbatsov/projectile#1051 that I submitted.

So I'll have to figure out how to adapt counsel-projectile to this change. Problem is, I can't find the time at the moment. I quickly looked at the issue that the commit was fixing but I didn't really understand why my PR had caused the issue. I see you were involved in the issue discussion, so you may understand better than me. Anyway, any idea you might have about this would be much appreciated. Perhaps a starting point would to check whether the issue also affects helm-projectile, and if not understand how it is addressed there.

from counsel-projectile.

raxod502 avatar raxod502 commented on July 17, 2024

Maybe d55966f fixed that?

Although since I prefer to show only files and not buffers in projectile-switch-project-action, the change does not affect me anymore.

from counsel-projectile.

ericdanan avatar ericdanan commented on July 17, 2024

This commit partially solved the issue, but for very large projects counsel-projectile is still a bit slow. I think this is because when a project file is currently visited by a buffer, it only displays the buffer and not the file. When there are many files, it is time-consuming to test for each one whether or not it is currently visited.

If your default action is counsel-projectile-find-file then you are not affected because this simply uses projectile-current-project-files.

from counsel-projectile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.