<div dir="auto"><div dir="auto"></div>Are you in "read to end" mode or in "count from end" mode?<div dir="auto"><br></div><div dir="auto">CBN</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sun, Mar 3, 2019, 12:08 PM Scott Armitage, <scott@armitage.space> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">At a data source file size of ~17.5 MiB, Kst2.exe is consuming ~80% CPU. I am now confident that it is _not_ a memory issue, as Kst2.exe is only using ~100 MiB of memory.<div><br></div><div>-S</div><div><br><div><br><blockquote type="cite"><div>On 2 Mar 2019, at 13:09, Scott Armitage <<a href="mailto:scott@armitage.space" rel="noreferrer noreferrer" target="_blank">scott@armitage.space</a>> wrote:</div><br class="m_-5847935821752020142m_-2223302833036300539Apple-interchange-newline"><div><div style="word-wrap:break-word;line-break:after-white-space">At ~10 MiB, kst2.exe is now pulling a constant 40% to 50% CPU usage.<div><br></div><div>-S<br><div><div><br><blockquote type="cite"><div>On 2 Mar 2019, at 11:45, Scott Armitage <<a href="mailto:scott@armitage.space" rel="noreferrer noreferrer" target="_blank">scott@armitage.space</a>> wrote:</div><br class="m_-5847935821752020142m_-2223302833036300539Apple-interchange-newline"><div><div style="word-wrap:break-word;line-break:after-white-space">For example, by the time my current log file had reached ~3.5 MiB, Kst2 was using nearly 30% of the CPU (Core i5-8250) and UI response of Kst2 had become sluggish. Responsiveness of the rest of the system remains fine.<div><br></div><div>-S</div><div><br><div><br><blockquote type="cite"><div>On 2 Mar 2019, at 10:14, Scott Armitage <<a href="mailto:scott@armitage.space" rel="noreferrer noreferrer" target="_blank">scott@armitage.space</a>> wrote:</div><br class="m_-5847935821752020142m_-2223302833036300539Apple-interchange-newline"><div><div style="word-wrap:break-word;line-break:after-white-space"><div><span style="font-family:"Times New Roman",serif;font-size:12pt">Hi Nicolas et al,</span></div><div><span style="font-family:"Times New Roman",serif;font-size:12pt"><br></span></div><div><span style="font-family:"Times New Roman",serif;font-size:12pt">I would be surprised if I am hitting memory limits, but I will check the next time I observe the slow-down (which should be this weekend, as I have just started a 48-hour test). I currently rotate the log files at 50 MiB, but that number is arbitrary; however, the lower I make it, the more often I have to go in and change the data source file.</span></div><div><span style="font-family:"Times New Roman",serif;font-size:12pt"><br></span></div><div><font face="Times New Roman, serif" size="3">The ASCII files (comma-delimited CSV, with either Windows or UNIX line endings depending on the exact situation) start empty. There are typically 28 columns, the first of which is an ISO timestamp of the form “yyyy-mm-dd HH:MM:SS.zzzzzz”, which I parse in Kst as the timestamp for each row. All other columns are floating point numerical data, which may occasionally read `nan`, `+inf`, or `-inf`, except for 7 of the columns which are integer numerical data.</font></div><div><font face="Times New Roman, serif" size="3"><br></font></div><div><font face="Times New Roman, serif" size="3">In typical usage, I am parsing 12 of the columns, plus the timestamp, and plotting them in four plots. The data is being plotted with lines, not dots.</font></div><div><font face="Times New Roman, serif" size="3"><br></font></div><div><font face="Times New Roman, serif" size="3">The log file is being written to at a row cadence of ~0.4 s from Python, calling `file.flush()` after each row to allow Kst to see the update.</font></div><div><font face="Times New Roman, serif" size="3"><br></font></div><div><font face="Times New Roman, serif" size="3">Is it the “Limit Buffer Size” option you are referring to? I have tried playing around with that, setting it to various values like 5 MiB or 10 MiB. I haven’t seen a benefit from it yet. When Kst starts to feel sluggish, its CPU usage goes to 25% (i.e. maxing out one full virtual core on my machine).</font></div><div><font face="Times New Roman, serif" size="3"><br></font></div><div><font face="Times New Roman, serif" size="3">In case it is relevant, I am running Kst2 32-bit on Windows 10 64-bit.</font></div><div><font face="Times New Roman, serif" size="3"><br></font></div><div><font face="Times New Roman, serif" size="3">Cheers,</font></div><div><font face="Times New Roman, serif" size="3">-S</font></div><div><font face="Times New Roman, serif" size="3"><br></font></div><div><font face="Times New Roman, serif" size="3">p.s. I have subscribed to the mailing list, so I should get responses to there now.</font></div><span style="font-family:"Times New Roman",serif;font-size:12pt"> </span><br><div><blockquote type="cite"><div class="m_-5847935821752020142m_-2223302833036300539WordSection1" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div><div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(225,225,225);padding:3pt 0cm 0cm"><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><b><span style="font-size:11pt;font-family:Calibri,sans-serif">De :</span></b><span style="font-size:11pt;font-family:Calibri,sans-serif"><span class="m_-5847935821752020142m_-2223302833036300539Apple-converted-space"> </span>BRISSET, Nicolas<span class="m_-5847935821752020142m_-2223302833036300539Apple-converted-space"> </span><br><b>Envoyé :</b><span class="m_-5847935821752020142m_-2223302833036300539Apple-converted-space"> </span>vendredi 1 mars 2019 18:13<br><b>À :</b><span class="m_-5847935821752020142m_-2223302833036300539Apple-converted-space"> </span>'<a href="mailto:kst@kde.org" style="color:rgb(149,79,114);text-decoration:underline" rel="noreferrer noreferrer" target="_blank">kst@kde.org</a>'<br><b>Objet :</b><span class="m_-5847935821752020142m_-2223302833036300539Apple-converted-space"> </span>RE: Option to "tail -f" ASCII file<u></u><u></u></span></div></div></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><u></u> <u></u></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Hi,<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Kst does not reload the files entirely, it parses them and keeps a pointer to the last processed line, and resumes from there in case new data arrives.<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">It may become slow with large amounts of data, your best bet is to tune the memory options available in the data wizard to avoid using up too much memory, which could lead your PC to swapping and that could make it slow.<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">What amount of data (size of ASCII file, number of columns, number of lines) are you dealing with, and in which form are they ploted (lines are much better optimized than points)?<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Nicolas<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span lang="EN-US"><u></u> <u></u></span></div><div><div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(225,225,225);padding:3pt 0cm 0cm"><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><b><span style="font-size:11pt;font-family:Calibri,sans-serif">De :</span></b><span style="font-size:11pt;font-family:Calibri,sans-serif"><span class="m_-5847935821752020142m_-2223302833036300539Apple-converted-space"> </span>Kst [<a href="mailto:kst-bounces@kde.org" style="color:rgb(149,79,114);text-decoration:underline" rel="noreferrer noreferrer" target="_blank">mailto:kst-bounces@kde.org</a>]<span class="m_-5847935821752020142m_-2223302833036300539Apple-converted-space"> </span><b>De la part de</b><span class="m_-5847935821752020142m_-2223302833036300539Apple-converted-space"> </span>Scott Armitage<br><b>Envoyé :</b><span class="m_-5847935821752020142m_-2223302833036300539Apple-converted-space"> </span>jeudi 28 février 2019 17:27<br><b>À :</b><span class="m_-5847935821752020142m_-2223302833036300539Apple-converted-space"> </span><a href="mailto:kst@kde.org" style="color:rgb(149,79,114);text-decoration:underline" rel="noreferrer noreferrer" target="_blank">kst@kde.org</a><br><b>Objet :</b><span class="m_-5847935821752020142m_-2223302833036300539Apple-converted-space"> </span>Option to "tail -f" ASCII file<u></u><u></u></span></div></div></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><u></u> <u></u></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif">Is there an option to follow ASCII files instead of reloading them in their entirety? Would this be a relatively straightforward addition?<u></u><u></u></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><u></u> <u></u></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif">I have a set of Python tools that generate CSV log files of telemetry, which are used by post-processing analysis tools. I recently started using Kst2 to visualize the data in real time. This works excellently! However, as the CSV files grow, Kst2 becomes sluggish as it reloads the entire file as new lines are written. In my environment, I know that these are output files that only grow, like log files. An option to follow the files, similar to "tail -f", would I think dramatically improve Kst2's performance in plotting these files in real time.<u></u><u></u></div></div></div><font style="font-family:Helvetica;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-size:9px">The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.<br>If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.<br>Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.<br>All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.</font></blockquote></div><br></div></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></div></blockquote></div></div></div>