Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 09/01/22 in all areas

  1. Hello, My colleague found a turnaround (without using the problematic SetText procedure) 0- As before, we add the lines with 'Courier New' and special characters. Result is ugly as shown before. But for each line of the memo, we store the font color and the size (in a memory object ALineSpecial). 1- At the end of the addings I place : RE.font.Name := 'Courier New'; All the text is now well aligned, but we lost the colors and the size. 2- I parse all the lines, and when needed, set the color and the size of the concerned line : myLineIndex := ALineSpecial.getInt1(i); // get the index of the line RE.SelStart := Perform(EM_LINEINDEX, myLineIndex, 0); // set start position of the selection RE.SelLength := length(Lines[myLineIndex]); // set lenght of the selection (the line) myColor := TColor(ALineSpecial.getO(i)); // get the color to apply (it comes from the memory object) RE.SelAttributes.Color := myColor; // apply the color to the selection And the result is OK Many thanks for your contributions, Denis
  2. Fr0sT.Brutal

    "Home made" data replicaion with Nexusdb

    I'm just theorizing basing on what I read on Firebird forum from a guy that develops universal FB replicator and adding some logic.The idea is simple - having identical initial state and set of changes, current state could be easily achieved. The devil is in details. If replica is just a RO mirror, things are relatively simple but if it must be a fully functional node with all modifications allowed - things are getting much more interesting
  3. Remy Lebeau

    No protocols available

    That line is effectively setting SSLOptions.Method to sslvSSLv23 and SSLOptions.SSLVersions to [sslvTLSv1_1, sslvTLSv1_2]. Which means, if the server does not support TLS 1.1 or TLS 1.2 then the TLS handshake will fail. Typically, that line should be as follows instead: SSL.SSLOptions.SSLVersions := [sslvSSLvTLS1, sslvTLSv1_1, sslvTLSv1_2]; The sslvSSLv23 flag has special meaning for Indy's internals and should not be used directly in most cases. The only valid use for using sslvSSLv23 in your code is to enable all supported SSL/TLS versions, eg: SSL.SSLOptions.Method := sslvSSLv23; // will set Method=sslvSSLv23 and SSLVersions=[sslvSSLv2,sslvSSLv3,sslvTLSv1,sslvTLSv1_1,sslvTLSv1_2] SSL.SSLOptions.SSLVersions := [sslvSSLv23]; // will set Method=sslvSSLv23 and SSLVersions=[sslvSSLv2,sslvSSLv3,sslvTLSv1,sslvTLSv1_1,sslvTLSv1_2] Otherwise, just ignore that the sslvSSLv23 flag exists, and set the SSLVersions property to just the desired protocol versions (2/3 is not a protocol version, it is a wildcard).
  4. My wrapper: https://github.com/zedxxx/libdeflate-pas
  5. dummzeuch

    wuppdi import

    committed to revision #3869
  6. I've got a generic TdzStreamCache implementation in my dzlib, which adds caching to any type of stream. Not sure whether it is any improvement to TMemoryStream though. I only used TMemoryStream in the unit tests to ensure that no data gets lost, I never timed it against it.
  7. Then please put the DLL projects into the repo with documentation on how to get the missing pieces to produce them ourselves instead of distributing binaries. As for the RTL routines - as mentioned FillChar already has been improved in 11.1 (and hopefully will get another final improvements - some of which are detailed here: https://msrc-blog.microsoft.com/2021/01/11/building-faster-amd64-memset-routines/). Pos has also been improved (mostly Win64 is affected by this as the new code is basically the purepascal code of what was the asm implementation for Win32). Hopefully for 12, we will get an improved Move I was working on (using SSE2 as that is the supported instruction set RTL can assume). Because Move handles forward/backward and overlap it covers what memcopy and memmove do. That leaves CompareMem which I already looked into in context of faster string comparison, UpperCase and Replace.
  8. First of there is no 10.5 - I assume you meant 11. That's like the mother of pointless benchmarks. We know that default MM is prone to problems with heavy multithreading. Test with FastMM5 because that has addressed that issue. For using TBB, I think it was mentioned in another thread that also the memory footprint should be considered. Part of the improvement might come from the better system routines such as Move (FillChar has already been improved in 11.1) - I have been working on an improved version but I am afraid we will not get it before Delphi 12. Also - I think I mentioned this before: in the age of supply chain attacks and malicious code being distributed via open source platforms, I would be very careful about using some binaries. You mentioned before how you compiled them: why are you reluctant to post the code on GitHub so everyone can compile it themselves?
×