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