mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-31 17:42:55 +08:00
Add qml profile notes
This commit is contained in:
parent
8f1e50a170
commit
7ec5941b0e
@ -89,6 +89,9 @@ Window {
|
|||||||
//
|
//
|
||||||
Connections {
|
Connections {
|
||||||
target: Cpp_UI_WidgetProvider
|
target: Cpp_UI_WidgetProvider
|
||||||
|
|
||||||
|
//*! Optimize this function
|
||||||
|
// About 6% of the UI thread is spent here
|
||||||
function onDataChanged() {
|
function onDataChanged() {
|
||||||
root.updateValues()
|
root.updateValues()
|
||||||
}
|
}
|
||||||
@ -97,6 +100,8 @@ Window {
|
|||||||
//
|
//
|
||||||
// Updates the internal values of the bar widget
|
// Updates the internal values of the bar widget
|
||||||
//
|
//
|
||||||
|
//*! Optimize this function
|
||||||
|
// About 6% of the UI thread is spent here
|
||||||
function updateValues() {
|
function updateValues() {
|
||||||
if (Cpp_UI_WidgetProvider.barDatasetCount() > root.datasetIndex) {
|
if (Cpp_UI_WidgetProvider.barDatasetCount() > root.datasetIndex) {
|
||||||
root.minimumValue = Cpp_UI_WidgetProvider.barMin(root.datasetIndex)
|
root.minimumValue = Cpp_UI_WidgetProvider.barMin(root.datasetIndex)
|
||||||
|
@ -41,6 +41,9 @@ Window {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Cpp_UI_GraphProvider
|
target: Cpp_UI_GraphProvider
|
||||||
|
|
||||||
|
//*! Optimize this function
|
||||||
|
// About 5% of the UI thread is spent here
|
||||||
function onDataUpdated() {
|
function onDataUpdated() {
|
||||||
// Cancel if window is not enabled
|
// Cancel if window is not enabled
|
||||||
if (!root.enabled)
|
if (!root.enabled)
|
||||||
|
@ -42,6 +42,9 @@ Window {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Cpp_UI_Provider
|
target: Cpp_UI_Provider
|
||||||
|
|
||||||
|
//*! Optimize this function
|
||||||
|
// About 14% of the UI thread time is spent here
|
||||||
function onUpdated() {
|
function onUpdated() {
|
||||||
if (root.enabled) {
|
if (root.enabled) {
|
||||||
var g = Cpp_UI_Provider.getGroup(groupId)
|
var g = Cpp_UI_Provider.getGroup(groupId)
|
||||||
@ -73,6 +76,9 @@ Window {
|
|||||||
model: group !== null ? group.datasetCount : 0
|
model: group !== null ? group.datasetCount : 0
|
||||||
delegate: DataDelegate {
|
delegate: DataDelegate {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
//*! Optimize this function
|
||||||
|
// About 11% of UI thread time is spent here
|
||||||
dataset: group.datasets[index]
|
dataset: group.datasets[index]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,7 @@ RowLayout {
|
|||||||
property alias flashDuration: _timer.interval
|
property alias flashDuration: _timer.interval
|
||||||
|
|
||||||
//
|
//
|
||||||
|
//*! Optimize this function
|
||||||
// Turns on the LED for a short period of time
|
// Turns on the LED for a short period of time
|
||||||
//
|
//
|
||||||
function flash() {
|
function flash() {
|
||||||
|
@ -70,6 +70,8 @@ Window {
|
|||||||
//
|
//
|
||||||
Connections {
|
Connections {
|
||||||
target: Cpp_UI_WidgetProvider
|
target: Cpp_UI_WidgetProvider
|
||||||
|
|
||||||
|
//*! Optimize this function
|
||||||
function onDataChanged() {
|
function onDataChanged() {
|
||||||
root.updateValues()
|
root.updateValues()
|
||||||
}
|
}
|
||||||
|
@ -170,6 +170,8 @@ Control {
|
|||||||
Connections {
|
Connections {
|
||||||
target: Cpp_IO_Console
|
target: Cpp_IO_Console
|
||||||
|
|
||||||
|
//*! Optimize these functions
|
||||||
|
//*! Over 50% of the UI thread time is lost here
|
||||||
function onLineReceived(text) {
|
function onLineReceived(text) {
|
||||||
textEdit.append(text)
|
textEdit.append(text)
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,8 @@ Control {
|
|||||||
//
|
//
|
||||||
Connections {
|
Connections {
|
||||||
target: Cpp_UI_Provider
|
target: Cpp_UI_Provider
|
||||||
|
|
||||||
|
//*! Optimize this function
|
||||||
function onUpdated() {
|
function onUpdated() {
|
||||||
root.title = Cpp_UI_Provider.title
|
root.title = Cpp_UI_Provider.title
|
||||||
if (groupGenerator.model !== Cpp_UI_Provider.groupCount) {
|
if (groupGenerator.model !== Cpp_UI_Provider.groupCount) {
|
||||||
@ -592,7 +594,7 @@ Control {
|
|||||||
font.family: app.monoFont
|
font.family: app.monoFont
|
||||||
color: palette.brightText
|
color: palette.brightText
|
||||||
visible: !Cpp_CSV_Player.isOpen
|
visible: !Cpp_CSV_Player.isOpen
|
||||||
text: Cpp_IO_Manager.receivedDataLength
|
text: Cpp_IO_Manager.receivedDataLength //*! Optimize this function
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
|
@ -44,6 +44,8 @@ Control {
|
|||||||
//
|
//
|
||||||
Connections {
|
Connections {
|
||||||
target: Cpp_UI_WidgetProvider
|
target: Cpp_UI_WidgetProvider
|
||||||
|
|
||||||
|
//*! Optimize this function
|
||||||
function onDataChanged() {
|
function onDataChanged() {
|
||||||
// Generate accelerometer widgets
|
// Generate accelerometer widgets
|
||||||
if (accGenerator.model !== Cpp_UI_WidgetProvider.accelerometerGroupCount()) {
|
if (accGenerator.model !== Cpp_UI_WidgetProvider.accelerometerGroupCount()) {
|
||||||
|
@ -146,8 +146,7 @@ void Export::closeFile()
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a CSV file based on the JSON frames contained in the JSON list.
|
* Creates a CSV file based on the JSON frames contained in the JSON list.
|
||||||
* @note This function is called periodically every 1 second. It shall write
|
* @note This function is called periodically every 1 second.
|
||||||
* at maximum 10 rows to avoid blocking the rest of the program.
|
|
||||||
*/
|
*/
|
||||||
void Export::writeValues()
|
void Export::writeValues()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user