tag:blogger.com,1999:blog-1077468864044303325.post3765253406812731555..comments2024-03-20T18:47:57.268+02:00Comments on Behind the connection: In memory message loggingFPiettehttp://www.blogger.com/profile/08260455911271500004noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-1077468864044303325.post-56111504509058354662014-02-20T13:45:08.106+02:002014-02-20T13:45:08.106+02:00Just one note: Keep in mind that even if the loggi...Just one note: Keep in mind that even if the logging class is extremely fast (that's the purpose of keeping it in memory) it can still serialize the calling threads as both threads have to wait for the critical section in the logging class. This can modify the behavior of the program.Unknownhttps://www.blogger.com/profile/08052245434800623032noreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-22507404521022446072014-02-17T18:20:02.927+02:002014-02-17T18:20:02.927+02:00Oliver, the application can periodically flush the...Oliver, the application can periodically flush the memory to disk. I do this using a timer and also at specific instants. Also, if - as I have show - you use the finalization section, the application should crash very badly to be not called.FPiettehttps://www.blogger.com/profile/08260455911271500004noreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-38571616165473090692014-02-17T12:11:05.142+02:002014-02-17T12:11:05.142+02:00What if the application crashes before the log was...What if the application crashes before the log was flushed to file? I find this kind of logging elegant but...error-prone.Sherlockhttps://www.blogger.com/profile/14542356285257275718noreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-5500995520773786202014-02-17T08:13:27.812+02:002014-02-17T08:13:27.812+02:00Hello,
Could you open up an SVN (because it is ea...Hello,<br /><br />Could you open up an SVN (because it is easy, if just follow and update) repository for all of the code you publish here. Would be good alternative way to follow. And/or if there is later changes to it.Anonymoushttps://www.blogger.com/profile/10190265805434297013noreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-1534810165097946362014-02-16T23:23:10.532+02:002014-02-16T23:23:10.532+02:00I'm agree that TEncode will not work fast enou...I'm agree that TEncode will not work fast enough.<br /><br /><br />Original post:<br /><br />for saving Unicode strings I would like to suggest this code which can simplify and remove the loop of iterating by symbol:<br /><br />var<br /> bufferData : TBytes;<br /> intOffset: Integer;<br /> buffEncod: TEncoding;<br /> msgBuffer: TBytes;<br />begin<br /> bufferData := Romannoreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-63409017504347234442014-02-16T18:04:46.163+02:002014-02-16T18:04:46.163+02:00I inadvertently deleted a comment from a user name...I inadvertently deleted a comment from a user named "Roman". Sorry. Please repost. I was suggesting to use TEncoding for converting Unicode. I just want to say that TEncoding is very slow compared to the simplistic loop I made.FPiettehttps://www.blogger.com/profile/08260455911271500004noreply@blogger.com