Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 05/25/22 in Posts

  1. I use actions a lot. In fact, sometimes I group related sets of actions into data modules, then use the data modules in the forms. Instead of double-clicking event handlers and calling procedures to do the work (or Execute methods of actions), just hook the actions directly up to the controls. The caption of the TAction becomes the caption of the menu or button; the Execute event of the TAction becomes the OnClick event handler of the Menu or Button. You can also provide icons for the associated controls right within a TActionList as well. Later, if you decide to change the user interface from using menus to using buttons (for example), you don't have to change the captions or event handlers but just assign the TAction! There are many other ways and probably some more "pure MVC or MVVM" but this has worked really well for me.
  2. Arnaud Bouchez

    Is Move the fastest way to copy memory?

    L1 cache access time makes a huge difference. http://blog.skoups.com/?p=592 You could retrieve the L1 cache size, then work on buffers of about 90% of this size (always keep some space for stack, tables and such). Then, if you work in the API buffer directly, a non-temporal move to the result buffer may help a little. During your process, if you use lookup tables, ensure they don't pollute the cache. But profiling is the key for sure. Guesses are most of the time wrong...
  3. David Heffernan

    Inline var not working this time

    Does it compile if you write TestProc()
  4. Vandrovnik

    FB-3 Get Connected Clients IP Numbers

    But the result contains addresses - just IPv6, not IPv4...
  5. Create a COM dll, Delphi has a wizard for that. Google for "C# com interop" to find examples for how to use such a thing from the .NET side.
  6. I'm aware that the documentation specifies that nodes with attachments must be document/pdf in binary format. Would you reproduce that part of the documentation here? I ask because what you tell is largely incomplete and confusing. If you show us a complete XML document with a PDF file attached, that could help. Someone could be able to recognize the encoding format. Maybe me.
  7. Anders Melander

    Is Move the fastest way to copy memory?

    Umm... You mean to say you haven't profiled it?
  8. Because I only work on the client side, I have no experience with server-side encoding. I'm aware that the documentation specifies that nodes with attachments must be document/pdf in binary format. My initial question was about how to convert PDF files to binary and then put it into XML. I'll try Base64 Encoding first, and if it works, I'll put a bit of code here for the other members to see. Thank you for your suggestions...
  9. You should profile your program to find out where the bottleneck is. Human intuition is usually wrong in such matters.
  10. "RTC SDK was originally developed by Danijel Tkalčec in 2004, and acquired by Teppi Technology in 2018 . Now, as of May 20th 2022, we announce that ReatlThinClient SDK (a.k.a. RTC SDK) is open source." https://rtc.teppi.net/ https://github.com/teppicom/RealThinClient-SDK
  11. Are you writing both ends of the document exchange system? If you must access an existing system, then you must get the specification of the attachment.
  12. This is a pointless endeavor unless you have some proof that the new code in Delphi 11 has a performance regression - the generated assembly code for the purepascal code is almost identical to the handwritten version before on x86 and all other platforms it should be significantly faster than the previous pure pascal implementation. (I should know - I did that change)
  13. corneliusdavid

    Working with Delphi and Excel

    Uh, how do you expect to get the contents of a file without opening it? Or do you mean that you don't want to use OLE? I've used XLSReadWrite successfully.
  14. Primož Gabrijelčič

    Is TOmniValue thread safe?

    On general, no. In specific cases maybe yes.
  15. Arnaud Bouchez

    Is Move the fastest way to copy memory?

    Don't expect anything magic by using mORMot MoveFast(). Perhaps a few percent more or less. On Win32 - which is your target, IIRC the Delphi RTL uses X87 registers. On this platform, MoveFast() use SSE2 registers for small sizes, so is likely to be slightly faster, and will leverage ERMSB move (i.e. rep movsb) on newer CPUs which support it. To be fair, mORMot asm is more optimized for x86_64 than for i386 - because it is the target platform for server side, which is the one needing more optimization. But I would just try all FastCode variants - some can be very verbose, but "may" be better. What I would do in your case, is trying to not move any data at all. Isn't it possible that you pre-allocate a set of buffers, then just consume them in a circular way, passing them from the acquisition to the processing methods as pointers, with no copy? The fastest move() is ... when there is no move... 🙂
  16. David Heffernan

    Is Move the fastest way to copy memory?

    I think Arnaud's synopse library has a bunch of more optimised mem copy routines
  17. Mavarik

    Request for advice: FireMonkey and Frames

    That's why I did not use frames at all... But with FMX there is no need for a "frame". For every content I create a Form with a TLayout. If there is any need to uses this content on a other form/tab/whatever, you just have to set the parent of the layout to the e.g. tab or any other layout on any other form. So easy... Frank
×