-
Content Count
562 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Tommi Prami
-
Is there buffered Memory stream implementation available
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Reallocation for sure. -
Made QP of replacing Delphi ZLib implementation with faster one.
Tommi Prami posted a topic in RTL and Delphi Object Pascal
Hello, QP here: https://quality.embarcadero.com/browse/RSP-38978 If you care, vote and or comment. -Tee- -
Is there buffered Memory stream implementation available
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
That sounds smart implementation, if blocks are big enough, SaveToFile etc (combining the data to one, or reading it to elsewhere) should be pretty fast also. -
Is there buffered Memory stream implementation available
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
As far as I know TMemoryStream does not buffer, at least in a way that I want to use it. -Tee- -
Is there buffered Memory stream implementation available
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Current code writes stuff into the memory stream in small chunks, it would be _easy_ optimization to have buffered memory stream. I used to have very crude memory stream that allocated memory with some mechanism that I can't remember, it was mainly used to write XML data back then, but it made some code 20x faster. (if I recall), but some isolated cases where way faster, than reallocating all the time. One thing I remeber is that implementation did reallocate always when buffer got full, so was not super smart, just some simple growth scheme. Sure I could rewrite the code at first place, but sometimes it is legacy code of some third party library, so rewriting might be too big of a task. Would be better to get some maintained library instead, if available. But it always is case by case call which way to go. -Tee- -
Made QP of replacing Delphi ZLib implementation with faster one.
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Sweet, could you publish code to QP as a starting point, and/or report your findings there? -Tee- -
I was pondering that if some one has good list of exceptions to catch and what these exactly mean, it would help, so no need to go through the code to find out. I mean that if I have no something like on E: Exception do ... I would prefer something like that (obviously just made up an example) on E:EIdSomethingSomethins do // Internet is most likely down on E:EIdTimeout do // Server did not respond, is could not connect on E :IdReadTimeOut do // Connected but could not read data ... Else Raise etc.. So I could more precisely catch all internet related exceptions and give more exact error messages. I've done something like that in the past but it was more than less cumulated info over time and not always very well analyzed, I think. I bet if someone have good exception handler and post here, and have some peer review and suggestions, we could have good starting point for all that want to do something similar
-
Good example of what exceptions TIdHTTP cielt can raise
Tommi Prami replied to Tommi Prami's topic in Indy
Giving own message, or having certain flow. Exception messages usually are not super good to show for users, because they are bit too technical. That's all. -Tee- -
This library is widely used, author uses it in his own work so it is not dead. If main developer is busy at the moment, others could chip in. I think he has time to merge solid pull requests. Also if the open bug iare no something that is deal breaker for you, just dive in.
-
Encode (pdf, jpg, ...) in to XML
Tommi Prami replied to msd's topic in Algorithms, Data Structures and Class Design
I am pretty sure it can't be (RAW) binary (will most certainly contain characters that are illegal in XML file) . Most likely Base64 encoded. But should check from Server side developers/docs -
FYI: Old security BUG fixed from ZLib
Tommi Prami posted a topic in Tips / Blogs / Tutorials / Videos
https://nakedsecurity.sophos.com/2022/03/29/zlib-data-compressor-fixes-17-year-old-security-bug-patch-errr-now/ -Tee- -
(Delphi 11.1) Stack overflow - save your work and restart Delphi 11.
Tommi Prami replied to Michael Collier's topic in Delphi IDE and APIs
Bug report link please, quite useless to report only here, need to report to Embarcadero. And link so we can vote. -
Delphi 11.1 Can't Clean project - reports missing DLL
Tommi Prami replied to Michael Collier's topic in Delphi IDE and APIs
Bug report link please, quite useless to report only here, need to report to Embarcadero. And link so we can vote. -
Delphi 11.1 file associations not set
Tommi Prami replied to Michael Collier's topic in Delphi IDE and APIs
Bug report link please, quite useless to report only here, need to report to Embarcadero. And link so we can vote. -
Delphi 11.1 "Open Recent" missing
Tommi Prami replied to Michael Collier's topic in Delphi IDE and APIs
Bug report link please, guitar useless to report only here, need to report to Embarcadero. And link so we can vote. -
Hello, I almost always missspell Lenhgt and Widht, can't remember other on top of my head but there are few. This does not matter how slowly I spell it in my head while typing, fingers will do the wrong order 🙂 -Tee-
-
More efficient string handling
Tommi Prami replied to parallax's topic in Algorithms, Data Structures and Class Design
Tineas thing of all (in this context), but always pass string parameters as const, if possible, procedure Foo(const AStringValue: string); -Tee- -
Project to create a language definition in BNF format started
Tommi Prami replied to TurboMagic's topic in RTL and Delphi Object Pascal
Read parts of it, but did not shed much light on how we could use it. I'll try to read it later with some though. -Tee- -
Project to create a language definition in BNF format started
Tommi Prami replied to TurboMagic's topic in RTL and Delphi Object Pascal
This BNF was new thing for me. Is there some easily usable "things" we could benefit from that Grammar. Any cool tools that could use that etc. Please educate me and others BNF-challenged persons :) -Tee- -
Frequent and/or annoying typos you make while coding
Tommi Prami replied to Tommi Prami's topic in General Help
Nice info dudes but besides the original question 🙂 I am not asking for solutions how to fix or find them, I want to just know what words you have problem of getting right. Please tell me what do you miss spell 🙂 -Tee- -
Keyboard shortcut to get into Object Inspector "search Edit"
Tommi Prami posted a topic in Delphi IDE and APIs
I've always liked to use search functionality of Object Inspector, but have not figured out how to get into there with keyboard, would think it would be Ctrl+F, but seems not. -
Keyboard shortcut to get into Object Inspector "search Edit"
Tommi Prami replied to Tommi Prami's topic in Delphi IDE and APIs
Let's check... Thanks! Never saw the cursor in the search box, maybe had habit to click with mouse etc right away... Cool! -Tee- -
Keyboard shortcut to get into Object Inspector "search Edit"
Tommi Prami replied to Tommi Prami's topic in Delphi IDE and APIs
Always wanted to use that filtering but "can't" because can't figure out how to get in there from keyboard -
True, Maintainer and/or lead developer would be still needed but as it is now, we can't help. -Tee-
-
Quite OK Image (QOI) image format
Tommi Prami replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
IMHO this seems to be image format that could stick. Fast and simple. Not super good compression, but not always that important. Depending on things. There seems to be some kind of Turbo Pascal implementation, which is quite weird. But Pascal port anyways. And what I looked at the GIT repo, people are making highly tuned Assembler code for it also. Let's see what happens. There already seems to be plugins for Windows Explorer and Paint.net, which is pretty cool it self. -Tee- PS did not see the post by Angus just before 🙂 Thanks for that!!