Jump to content

David Heffernan

Members
  • Content Count

    3487
  • Joined

  • Last visited

  • Days Won

    171

Everything posted by David Heffernan

  1. David Heffernan

    Running complicated python code from existing TThread hangs

    Doesn't matter how many threads you use. It's an issue with the Python GIL that requires special treatment with threads.
  2. David Heffernan

    Running complicated python code from existing TThread hangs

    thread safe? · Issue #47 · pyscripter/python4delphi · GitHub
  3. David Heffernan

    Multiple Instances of Python Engine

    Do you need multiple modules? You talked about multiple modules to hold different data. But why does the data have to live in a module?
  4. David Heffernan

    How create a website whit Delhpi

    I quoted it in my previous comment. You might want to read it for yourself.
  5. You don't need to know the size of anything to persist properties. The way to do that is to use the streaming framework. There are many example codes on the web. You are probably making a mistake in believing that you need to copy a block of memory. That's not how to do persistence of complex structures.
  6. This is very complex. The answer you link to is the size when serialized. But that bears no real relation to the memory used by the class at runtime. Also there are the system resources that are used. The real question though is what you are planning to use this value for. Knowing that would allow us to understand better how you might solve this.
  7. David Heffernan

    How create a website whit Delhpi

    This is what was stated, @FPiette. What makes you think that there is a large amount of existing Delphi code.
  8. David Heffernan

    How create a website whit Delhpi

    That is beside the point of this topic. Remember what the OP has actually asked.
  9. David Heffernan

    How create a website whit Delhpi

    What the OP is asking for doesn't seem to have any requirement for server side code. Remember that we aren't talking about your requirements, we're talking about those of the OP.
  10. David Heffernan

    How create a website whit Delhpi

    And you don't think that maybe, just maybe, Delphi isn't the best tool for this?
  11. David Heffernan

    How create a website whit Delhpi

    You don't do that with Delphi is the simple answer.
  12. David Heffernan

    Prefix unit local variable names

    a is for argument
  13. David Heffernan

    How create a website whit Delhpi

    We still have basically no idea what you are asking.
  14. Generally it's wise to try not to do this.
  15. David Heffernan

    How create a website whit Delhpi

    There are countless ways in which Delphi code may be involved in web development. If you want anybody to spend their time helping you I suggest that you spend more of your time thinking about your problem, and specifying in more detail what specifically you need help with.
  16. This has been answered above. It's the use of an intermediate string variable that holds the entire text which is then saved. And strings have 32 bit length. I'm not sure what @emailx45 is getting at but the problem you face is not due to a shortage of memory or address space. It's just that the string length is stored in a 32 variable. And a string is used by SaveToFile to save the text. FWIW, it seems wasteful to me to make an in memory copy of GBs of text just to save it. I'd be looking for a writer based approach. Just not using the raw RTL classes because of their dire performance.
  17. David Heffernan

    Multiple Instances of Python Engine

    What exactly is your rationale for wanting to use multiple engines? Why is it not possible to do this with a single engine?
  18. David Heffernan

    Generic record helper for enumeration types

    You can't have generic helpers.
  19. You don't need the if. You know that sList is not nil. Also, Free already includes a nil check. Also, there is the <> operator for not equals.
  20. Is your executable compiled with the overflow checks compiler option enabled?
  21. In what way? Can you be more specific. As for the main problem, I'm not surprised. I'd expect that you'd be better off using a stream writer to write such a huge collection to a stream. I'd submit a bug report to QP, in case on doesn't already exist, and then write some helper code to workaround the issue.
  22. David Heffernan

    null terminated string array

    Maybe, but I'm still using XE7 which is why my own code doesn't use the RTL string helper.
  23. David Heffernan

    null terminated string array

    https://quality.embarcadero.com/browse/RSP-10041 https://quality.embarcadero.com/browse/RSP-11302 Here are a couple of examples, but there are more.
  24. David Heffernan

    null terminated string array

    Good point. But I'm using XE7 and the string helper has many many bugs, including I believe in one of the split or join functions. Plus, my version minimise heap allocation.
×