Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/13/22 in all areas

  1. Anders Melander

    No one can help

    This whole thread is a big waste of everyone's time, including the OP. There's no point in trying to come up with alternate solutions when it seems no real attempt has been made to locate and isolate the cause of the problem. Run your application in the debugger. When the out-of-memory occurs, look at the call stack and place a breakpoint somewhere up the call stack before the call to the lower level method. Reset the debug session and run again. When the breakpoint is hit, single-step into the methods below, watch the memory consumption and try to understand what's going on in the code. At some point, you will likely arrive at the location where too much memory is allocated and the cause and/or solution will present itself. I do have a hunch about what the problem is, but it's no better than all the other guesses when the basic troubleshooting hasn't been done.
  2. Lars Fosdal

    No one can help

    I read / comment here whenever I have a few minutes to spare, but I can't commit to answer personal messages for support. I prefer to do the communication here, as other may (or may not) chip in - since that is what a community is for.
  3. Dalija Prasnikar

    No one can help

    Don't use memory stream to load data to rich edit. Create temporary file and write the data into that file and then load the data from the filestream. However, no matter what you do, at some point you will run into memory issues with 32-bit application if your application consumes a lot of memory. I suggest you switch to 64-bit. If you cannot switch to 64-bit, then the only other option is optimizing other parts of your application to reduce overall memory usage. First step for optimizing would be getting rid of all memory leaks - they can cause fragmentation which can be a huge problem. Next, reducing total memory allocation, by releasing anything that is not used at the time. Be careful with creating local components that have owner which you don't explicitly free. They will not show as memory leaks, but every time you call such method your memory consumption will increase. If that does not help, then you can try reducing memory load by avoiding default string type which is Unicode since D2009 (you haven't said which Delphi version you use) and use UTF-8 encoded strings - UTF8String and convert to Unicode only when you need to display data to the user - this is really the last option as you may need to write a lot of supporting code to avoid accidental conversions to and from Unicode strings as they will slow your application down and use extra memory in the process.
  4. Fr0sT.Brutal

    No one can help

    Then I really wonder why this topic lasts for 3 pages already and there's still no minimal reproducible sample here?
  5. Lars Fosdal

    Regex help please..

    You have a problem. You apply RegEx to solve the problem. You now have two problems.
  6. Anders Melander

    Sweet 16: Delphi/Object Pascal

    People who write low-level code where performance is important. If by "widely used" you mean "used by most" then no. But then it never was. "Most people" wouldn't know how to create the tools or write the libraries that they use, but someone has to do it. Even if you don't have a need to write assembler, knowledge of it makes you a better developer because it gives you a deeper understanding of what's going on and why. The same goes for hardware.
  7. Attila Kovacs

    No one can help

    I don't believe you a word. You can't even debug. You are just trolling us.
  8. Anders Melander

    No one can help

    Instead of all this guesswork why not simply use the debugger to determine where the out-of-memory occurs?
  9. Dalija Prasnikar

    No one can help

    The question is whether or not you have done that correctly. The moment you write the data to file, you need to release memory of all the temporary data that was used in that process before you try to load that into control. MyMemStream := ProjectsFDTable.CreateBlobStream(ProjectsFDTable.FieldByName('Description'),bmRead); try TMemoryStream(MyMemStream).SaveToFile('t.txt'); // using absolute path is preferred finally MyMemStream.Free; end; Memo1.BeginUpdate; try Memo1.LoadFromFile('t.txt'); finally Memo1.EndUpdate; end;
  10. Attila Kovacs

    Regex help please..

    there is a PCRE regex in newer Delphi releases, yes, at some degree it will work
  11. Lars Fosdal

    No one can help

    Even simple solutions can lead to complex problems.
  12. Lars Fosdal

    No one can help

    The format of the data and how they live in the application decides the memory consumption. Think about web content. Huge amounts of graphics and video in a 32-bit browser 32-bit OS, even with as little as 2Gb of memory. How does it do that? Load on demand and using temporary storage outside the browser such as file cache or direct streams. If we load a block of data from a DB - and that data has to be loaded into a stream - and then fed into an editor - we are using that memory at least three times, maybe four - depending on how the control stores the data. Divide and conquer. Instead of one blob - use a separate table to hold individual images. Explore if there are ways to load the image data on demand instead of embedding them in the control.
  13. Attila Kovacs

    Regex help please..

    \p{L}+([-+.']\p{L}+)*@\p{L}+([-.]\p{L}+)*\.\p{L}+([-.]\p{L}+)*$ the devanagari fails
  14. aehimself

    No one can help

    There can be multiple reasons Wrong database design from the beginning Either the person had no understanding how it should be done or thought that the small amount of data what it will hold won't cause further issues. Then it grew out of control. To be honest (especially in newer applications) developers tend to completely ignore edge cases, lower hardware specs. "It works on my PC" Legacy dragging on This is exactly the case at us at work. Application was created ~20 years ago, when DB backends worked completely different and the architecture was functioning correctly. Now with thousands of tables and TBs of data stored it's not an easy task to start to split these so when a customer complaint comes in, we fix that one. At this speed the redesign won't be done in the next 5 years for sure and expose us to a risk that once done we'll have to start it again due to backend changes. Can't reproduce Not just the amount of data but the data itself can cause issues. Generally speaking, due to GDPR and confidentiality we, the developers aren't allowed to access and work with production data. When an export is needed, data is obfuscated before loaded in our test systems and this obfuscation itself is already changing the data. Once I spent days before figuring out that a rendering issue was caused by a BOM left in a BLOB field (customer just uploaded a file instead of using our editor), which was simply trimmed during obfuscation. As quick as possible, no future in mind This is especially true for commercial software unfortunately. Customers want more and more, quicker and quicker. In lots of occasions new features are added on a "quantity over quality"-basis. Just get it to work, get us paid, customer is happy - at least for now. This isn't necessarily a management issue as recognizing the need for, as well as optimization itself needs knowledge, time and manpower. Depending on the size, a company can lack many of this. These are just my 2 cents. Nothing is unfixable, question is always: at what cost.
  15. Fr0sT.Brutal

    No one can help

    I give up. Just get more memory and chill.
  16. Mustafa ֍zgun

    iOS File Share With Other Apps

    Delphi - iOS File Storage & Sharing available at https://github.com/emozgun/delphi-ios-file-storage-sharing provided Importing files from other apps part from TMS Software FlexCel iOS Guide and Exporting and Sharing Files To Other Apps from Kastri ShareItems.
  17. programmerdelphi2k

    TAlphaColorRec in Android

    Your code is?
  18. Igor Sitikov

    Looking for a localization tool

    You would need just to "re-save" them. Open in the IDE and save again, and TsiLang will automatically convert its binary data to the textual.
  19. Mike Torrettinni

    Windows App hosting options?

    You might get better answers on forums related to website design... but, I have a simple /downloads page where php script does the downloading on Download button, there is no direct links. I don't have it designed this way because of ads, but I want to make sure they always download the latest version. I would multiply download file size with the download times you think you will get in a month, then you find the hosting that suits the download bandwidth. From my experience, the hosting packages don't just cut you off when you reach the max bandwidth, but they send multiple warning before you reach it. And then you can decide to upgrade or switch to another hosting, if that is easy for you to do. Don't forget that is pretty common to download zip files, so this can give you a little help with bandwidth.
  20. programmerdelphi2k

    Searching for full-time remote position...

    Daniele Tetti needs "some hands" by starting on 32K + goods see on this forum
  21. Daniel

    No one can help

    Next time please choose a meaningful subject for your thread.
  22. Attila Kovacs

    No one can help

    Try to find some resources on "relational database" first. Instead of stuffing everything into a giant BLOB in one record, split them up in other tables in many rows and have a reference to the main document.
  23. I'm no longer looking. I am officially walking away from software engineering. I wish everyone the best.
  24. Fr0sT.Brutal

    Regex help please..

    ...and then International Domain Names come into chat
  25. Anders Melander

    Searching for full-time remote position...

    P.S. Good luck with the writing
×