Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the preference help messages to clarify which directories are searched for file links #5891

Closed
joelostblom opened this issue Jan 29, 2020 · 7 comments · Fixed by #6451 or JabRef/user-documentation#283
Labels
good first issue An issue intended for project-newcomers. Varies in difficulty. preferences type: enhancement ui

Comments

@joelostblom
Copy link

I couldn't figure out why "Automatically set file links" was taking so long until I found this comment mentioning that the directory where the .bib database is located is being searched recursively (which was my home directory because I am just getting start with jabref). This was surprising to me since I had "Use the BIB file location as the primary file location" unchecked and had specified a directory to search manually.

It would be helpful if it was displayed in the preferences file tab (maybe via hover messages) which directories are being searched so that it is clear to the user. Changing the location of the bib file did not only improve the performance of "Automatically set file links", but the general snappiness of JabRef and makes my CPU spin up less often. These attributes are quite important for the overall impression of the program, so some sort of indication recommending not to use a very large file tree could also be valuable.

@tobiasdiez tobiasdiez added preferences ui good first issue An issue intended for project-newcomers. Varies in difficulty. labels Feb 1, 2020
@silverhorse
Copy link

I want to contribute to jabref as first contribution. I looked at this issue and it appears there is a bug - when the "Use the BIB file location as primary file directory" is unchecked and a directory is explicitly provided, search is still taking time to complete even though the provided directory is empty. Is this a known issue? It seems the file location's directory is still being searched, which contains lots of files and directories leading to long search time.

@Siedlerchr
Copy link
Member

@silverhorse Thanks for your investigation. That sounds like a bug. You can check the code, the relevant methhods should be getFileDirectoriesAsPaths in BibDatabaseContext and getFirstExistingFileDir
And the method which does the search should be in FileUtil, method "find"

@silverhorse
Copy link

@Siedlerchr thanks for replying. I looked at the code and it seems the BIB file directory is always added for search, even though the checkbox is not clicked. If the checkbox is clicked, it is added at first position in list of directories to search, otherwise it is added at last position. So, I want to confirm the default behaviour of "Automatically set File links" feature. Is it supposed to always search in the BIB file location directory? OR Should we skip the file's directory only when main file directory is provided, otherwise there will be no directory to search.

@Siedlerchr
Copy link
Member

I would say, only search in the bib location directory when the checkbox is checked.
And when it's checked it takes precedence over all other directories.
The library and user specific file directories can be set in the library properties.

@silverhorse
Copy link

@Siedlerchr I will focus on fixing the bug then and float a PR.

@silverhorse
Copy link

@Siedlerchr I have created a draft PR. Its WIP and I need to make sure all testing passes as mentioned in documentation. However, it would be great if you could see the changes I have done and point out anything to lookout for. Thanks to @koppor who has commented on the sensitivity of these changes already.

@Siedlerchr
Copy link
Member

thanks to @silverhorse and @abadar this issue is now fixed.

We would like to ask you to use a development build from https://builds.jabref.org/master and report back if it works for you. Please remember to make a backup of your library before trying-out this version.

koppor pushed a commit that referenced this issue Feb 15, 2022
eb97405 Create frattura-ed-integrita-strutturale-fracture-and-structural-inte… (#5877)
b33ebfc make journal names title case (#5900)
1c7ecf2 Update uclouvain-centre-charles-de-visscher-pour-le-droit-internation… (#5901)
1a2ea12 Create trinity-college-dublin-zoology-botany-environmental-sciences-h… (#5893)
6bd742c Update harvard-anglia-ruskin-university.csl (#5840)
bc8f258 Update chicago-author-date.csl (#5836)
80aded6 Fix missing prefix for URL field (#5894)
b850a0d Update american-society-of-civil-engineers.csl (#5891)
94c1cb3 Update deutsche-gesellschaft-fur-psychologie.csl (#5861)
f66f384 Update universite-cheikh-anta-diop-faculte-de-medecine-de-pharmacie-et-dodontologie.csl (#5863)
82cf786 Update and rename acta-psychiatrica-scandinavica.csl to dependent/acta-psychiatrica-scandinavica.csl (#5879)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: eb97405
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue An issue intended for project-newcomers. Varies in difficulty. preferences type: enhancement ui
Projects
Archived in project
5 participants