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

The JabRef goes mad after clicking Enable saving actions in database properties. #2596

Closed
psychelzh opened this issue Mar 1, 2017 · 7 comments

Comments

@psychelzh
Copy link
Contributor

psychelzh commented Mar 1, 2017

Version information:

JabRef 3.8.2
windows 10 10.0 amd64 
Java 1.8.0_121

Steps to reproduce:

  1. Open database properties dialog, and Click Enable saving actions.
  2. Using Tasks Manager in Windows 10, you will see JabRef costing a high quota of CPU, esp. higher than 30% for my laptop.
  3. The directory contains the BibTex file will continuously generate new *.sav.log file and delete it again and again.
  4. When open the error console, there is nothing in the Exception tab.

Only one log of opening my database found in the error console

20:15:08.224 [AWT-EventQueue-0] INFO  net.sf.jabref.logic.importer.OpenDatabase - Opening: D:\git\JabRefBibs\MyFullResearch.bib

Additionally, when I disabled the saving actions, everything becomes still at once.

@lenhard
Copy link
Member

lenhard commented Mar 2, 2017

I cannot reproduce this. When I enable save actions on my bib file, there is no performance increase or weird creation of save files.

I assume your problem is the following: You have a large bib file with many things to fix. When you first enable save actions, every action taken triggers a change event, which results in the sav file being created. Since there are many entries and many things to fix, this happen a lot of times. However, this is a one time process. Once the save actions have reformatted your fields, or whatever you configured them to do, the next save will be significantly faster since fewer actions will be performed.

How large is your file? Which save actions are you using? How many line changes are there after the 'mad' save? (Since your file seems to be in git that should be very easy to find out).

@lenhard lenhard added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Mar 2, 2017
@psychelzh
Copy link
Contributor Author

psychelzh commented Mar 2, 2017

My BibTex file is 249KB large, including 199 entries. And I use BibLaTex mode.

Here is my enabled save actions.

@Comment{jabref-meta: saveActions:enabled;
date[normalize_date]
pages[normalize_page_numbers]
month[normalize_month]
all-text-fields[latex_to_unicode,ordinals_to_superscript]
title[html_to_unicode]
;}

Strange enough, I checked my bib file, and I found there was not a single line really changed except those lines about jabref-meta. And the system keeps generating new *.sav.log file and deleting it.

@lenhard
Copy link
Member

lenhard commented Mar 2, 2017

Ok, thanks! With this information I can reproduce the behavior!

The problem is the following save action
all-text-fields[latex_to_unicode,ordinals_to_superscript]

In this configuration you are telling JabRef: "Convert all LaTeX stuff to Unicode (latex_to_unicode) and convert all ordinals to LaTeX superscript (ordinals_to_superscript)." This contradicts with each other since JabRef is trying to remove all LaTeX stuff and add LaTeX stuff at the same time. It seems, strangely, that JabRef is stuck in a loop as a result.

You will have to select, though: Do you want all LaTeX code to be replaced by Unicode or do you want to have things like \texsuperscript in your entries? Both things at the same time are not possible.

Using just one of the formatters works fine for me.

@lenhard lenhard removed the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Mar 2, 2017
@psychelzh
Copy link
Contributor Author

Thank you so much for your explanation in such details. I removed ordinals_to_superscript, and it suddenly becomes clear.

Howerver, what I want to mention here is that these save actions are actually the recommended ones of JabRef. I just click the label Recommended for BibLaTeX, and these very save actions come out there. It must be so weired that there could be some issues to fix for the recommendation.

Did I make it clear? And I hope these feedbacks could be of help.

1 similar comment
@psychelzh
Copy link
Contributor Author

Thank you so much for your explanation in such details. I removed ordinals_to_superscript, and it suddenly becomes clear.

Howerver, what I want to mention here is that these save actions are actually the recommended ones of JabRef. I just click the label Recommended for BibLaTeX, and these very save actions come out there. It must be so weired that there could be some issues to fix for the recommendation.

Did I make it clear? And I hope these feedbacks could be of help.

@lenhard
Copy link
Member

lenhard commented Mar 2, 2017

Thanks for pointing this out, this needs to be changed! I guess that the combination worked at the time when it was defined. We are constantly improving the formatters, for instance the latex to unicode formatter was heavily extended recently. Due to such changes, the configuration might have been broken.

@psychelzh
Copy link
Contributor Author

Thank you very much! It will be great then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants