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

Performance improvements #449

Merged
merged 14 commits into from
Apr 2, 2024
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 4.0.1 - UNRELEASED

### Fixed

- Performance improvements for Retina Displays.
KievDevel marked this conversation as resolved.
Show resolved Hide resolved

## 4.0.0 - 2024-03-13

### Added
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pc-nrfconnect-ppk",
"version": "4.0.0",
"version": "4.0.1",
"displayName": "Power Profiler",
"description": "App for use with Nordic Power Profiler Kits",
"homepage": "https://github.com/NordicSemiconductor/pc-nrfconnect-ppk",
Expand Down Expand Up @@ -53,7 +53,7 @@
"@types/redux-mock-store": "^1.0.3",
"@types/unzipper": "^0.10.9",
"bson": "4.6.5",
"chart.js": "^4.3.3",
"chart.js": "^4.4.2",
"mathjs": "^10.6.3",
"react-chartjs-2": "^5.2.0",
"redux-mock-store": "^1.5.4",
Expand Down
1 change: 1 addition & 0 deletions src/components/Chart/AmpereChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ export default ({
},
},
},
devicePixelRatio: 1,
parsing: false,
maintainAspectRatio: false,
animation: false,
Expand Down
16 changes: 12 additions & 4 deletions src/components/SaveExport/ExportDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
*/

import React, { useEffect, useMemo, useRef, useState } from 'react';
import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from 'react';
import ProgressBar from 'react-bootstrap/ProgressBar';
import { useDispatch, useSelector } from 'react-redux';
import { dialog, getCurrentWindow } from '@electron/remote';
Expand Down Expand Up @@ -149,12 +155,14 @@ export default () => {
.replace('u', '\u00B5')
);
}, [duration]);
const filename = createFileName();
const close = () => {

const close = useCallback(() => {
cancel.current = true;
dispatch(hideExportDialog());
};
}, [dispatch]);

const saveFile = async () => {
const filename = createFileName();
const { filePath: fn } = await dialog.showSaveDialog(
getCurrentWindow(),
{
Expand Down
2 changes: 2 additions & 0 deletions src/features/minimap/Minimap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ function initializeMinimapChart(
],
},
options: {
parsing: false,
devicePixelRatio: 1,
animation: false,
layout: {
autoPadding: false,
Expand Down
Loading