Skip to content

Commit

Permalink
Remove max_threads_parsing setting
Browse files Browse the repository at this point in the history
address GH issue #67
  • Loading branch information
molsonkiko committed Jun 19, 2024
1 parent 030a6c3 commit a1b72aa
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1. Made the tree view font size configurable with the [`tree_view_font_size` setting](/docs/README.md#styling-of-forms). Fixes [issue 66](https://github.com/molsonkiko/JsonToolsNppPlugin/issues/66).
2. Added dark mode tree view icons (addresses [this GH issue comment](https://github.com/molsonkiko/JsonToolsNppPlugin/issues/66#issuecomment-2169216078)).

### Changed

1. Removed the `max_threads_parsing` setting for the [JSON from files and APIs form](/docs/README.md#get-json-from-files-and-apis), because nobody upvoted the first post in [GH issue 67](https://github.com/molsonkiko/JsonToolsNppPlugin/issues/67).

### Fixed

1. Avoid unnecessarily refreshing the styles of all forms when settings other than `use_npp_styling` or `tree_view_font_size` are changed.
Expand Down
8 changes: 7 additions & 1 deletion JsonToolsNppPlugin/Forms/GrepperForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ namespace JSON_Tools.Forms
{
public partial class GrepperForm : Form
{
/// <summary>
/// maximum number of threads to use when parsing JSON
/// (each thread parses a separate subset of the documents)
/// </summary>
public const int MAX_THREADS_PARSING = 4;

public TreeViewer tv;
public JsonGrepper grepper;
HashSet<string> filesFound;
Expand All @@ -26,7 +32,7 @@ public GrepperForm()
NppFormHelper.RegisterFormIfModeless(this, false);
FormStyle.ApplyStyle(this, Main.settings.use_npp_styling);
grepper = new JsonGrepper(Main.JsonParserFromSettings(),
Main.settings.max_threads_parsing
MAX_THREADS_PARSING
);
tv = null;
filesFound = new HashSet<string>();
Expand Down
1 change: 0 additions & 1 deletion JsonToolsNppPlugin/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,6 @@ static void OpenSettings()
if (grepperForm != null && !grepperForm.IsDisposed)
{
grepperForm.grepper.jsonParser = JsonParserFromSettings();
grepperForm.grepper.maxThreadsParsing = settings.max_threads_parsing;
}
if (settings.tree_view_font_size != oldTreeViewFontSize || settings.use_npp_styling != oldUseNppStyling)
RestyleEverything();
Expand Down
4 changes: 2 additions & 2 deletions JsonToolsNppPlugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("7.2.0.2")]
[assembly: AssemblyFileVersion("7.2.0.2")]
[assembly: AssemblyVersion("7.2.0.3")]
[assembly: AssemblyFileVersion("7.2.0.3")]
6 changes: 0 additions & 6 deletions JsonToolsNppPlugin/Utils/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,6 @@ public class Settings : SettingsBase
public bool auto_try_guess_csv_delim_newline { get; set; }
#endregion

#region GREP_API_SETTINGS
[Description("How many threads to use for parsing JSON files obtained by JsonGrep and API requester"),
Category("Grep and API requests"), DefaultValue(4)]
public int max_threads_parsing { get; set; }
#endregion

#region STYLING
[Description("Use the same colors as the editor window for the tree viewer and other JsonTools forms?"),
Category("Styling"), DefaultValue(true)]
Expand Down

0 comments on commit a1b72aa

Please sign in to comment.