You are not logged in.
Yes,
I think something like that would cool.
Because I think framework is the best place for it. Even if it needs some (specific) table(s) (specific structure) to log the changes or what ever the mechanism would be.
And other point is the there is no need to anyone to solve this same problem if they need the Undo/Redo. And most likely there must be some kind of separation by user (or other entity). So that it is not just an undo for changes at general, but undo by some id, and maybe from middle the "change queue". If just possible.
Maybe user must write some handlers and/or event handlers. To help the Framework do it's job correctly regarding to the Undo/Redo feature. But still. Easier the feature is to implement and more flexible it is. I think that would be very strong selling point for the framework...
-TP-
And I'm hoping that ThreadSmart is also ThreadSafe: I've already seen applications running very fast... until they crash...
Code snippets are a very good idea.
I'll look into it. There are a lot of code sample of those techniques in the framework, so a simple copy & paste should be good enough...
Yes, if you don't mind, that would be very good.
And My idea of ThreadSmart would be also the ThreadSafe, but smarter ![]()
.-TP-.
Hello,
I have been thinking of two terms that should be used.
ThreadSafe - For code that works in multithreaded environment, don't crash and works as expected. (what it means
)
ThreadSmart - That runs very fast and is (maybe) best solution ![]()
Basically some guidelines, as mentioned above are very very important. To help programmer to look for own code to make it better.
I just like to make challenge to someone(s) to start keeping up (a blog) document where would be up to date list of these. And I would like to have some kind of example codes sniplets.
Code Before and After from ThreadSafe to ThreadSmart
Because this way it would be much more clear. We all have not very good English, me included, but we all speak Pascal. So it would be the universal language for all of us. This would help all very very much (And when I am talking of Someone I am not talking of that it necessarily should be Arnaud Bouchez, he has done so much already)
-Tee-
Hello,
I am not sure that we are on the same page, but basically I mean that user must have to have possibility do multistage undo (and redo also, as you mention).
If you make 10 changes, you should be able to step back those 10 and then start again if you want to. and IMHO it is the job of the framework, not an "application" to make the support for undo/redo steps. If you can tweak it (etc) that is bonus. But just rollback multiple commits (one or multiple steps), would be cool....
-Tee-
OK,
Like all normal programs, Undo is very very important feature. And if there is some kind of support to save the changes at the serverside. Undo should be doable. (To work it would need some kind of table structure to save all the changes).
But multistage Undo would be a must feature in my point of view. Does not matter how it is done. But basically almost any kind of app would need an Undo, or at least would make it much better. I've been developing an application that did not have Undo, and it really made everything so bad (for User). Users had to really think very carefully what to do. And in many cases they did not have courage to do any changes even they needed to. Because there was no way back.
I think that any framework that sits between (G)UI and DB should have undo. Way or other...
-TP-
Hello,
Sounds good. But one feature, I think, is a MUST have.
Undo. Possibility make easy undo of operations done into the database. BEcause coding it at higher level is pain. and I think ORM/Persistence framework must have built in support or Undo.
just my $0.02
-Tee-
Hope that TTextWriter is not a Female then ![]()
(Sorry could not resist)
Good to hear that there is an progress.
I was just pondering how ScaleMM will work with large blocks.
Allocating and Disposing is locked, because of FastMM (etc) underneath, but how about using them, like copying smaller blocks for processing etc... Will that be lock free? I Suppose so... (Just to try to understand where this is currently)
I need ScaleMM for one server, but quite often it uses large blocks, they are owned by each thread (so no cross thread usage), but just been thinking that operations on those are blocked anyways with FastMM currently.
And other thing crossed my mind is that most likely the OmniThreadLibrary users would also gain from ScaleMM, if there are no too much depencies between the OTL and FMM...
-TP-
D2010 compiled it just fine...
-TP-
I compiled it with Delphi 2010. Previous versions will have problems with the record semantic.
I looked at it and it looked strange to me, but not sure a which point it was introduced...
I'll compile with D2010 at home...
-Tee-
Please check out my latest revision:
http://code.google.com/p/delphi-toolbox … Free/?r=30
Could not compile, D6 don't open the project, dies in Access Violation (Something wrong in my installation). And D2007 gives internal error when trying to compile it
So I can't compile and test it at all for now...
I try it at home, but if it would be possible to have compiled .exe, and some bat to run some standard "test suite", with various settings.
Maybe to modify the test program to write Log on disk, to make posting into here easier...
-TP-
I am quite interested to know which one runs faster.
But I don't have access to high core machines right now...
Would anyone be intested in testing out the code for me?
Put compiled test Exe(s) somewhere so I can run them, I have i7 980x. I am very interested into test this...
-TP-
Oops,
I was more than less uninformative ![]()
I mean .exe compiled version of test/bechmark tool, so I could test them more easily (see the difference on my machine(s))
Sorry for that, I need to concentrate more ![]()
-Tee-
Hello,
Could you send me compiled versions of those (easier to test on my machines). Or put them into some public place for download.
-TP-
I knew about the Fastcode MM challenge, but didn't take a look at this one since years, because it was not benchmarking MM on multi-core CPU at this time. Scaling was not a problem, and FastMM4 was winning most challenges.
Maybe it would be worth to add multithreaded test into it ![]()
-TP-
I found the FastCode MM Challenge this weekend, which contains good MM tests: I already fixed some small problems. Still some AVs wit realloc, hope to fix this soon.
I think that BV-tool would be very good starting point, it it passes, then you must be close...
-TP-
Hello hello,
One question, if this is meant for small en medium blocks (most common) how it is going to scale with threads that use very large data blocks, think of handles large bitmaps?? Will it scale better than FastMM or is it the same?
-TP-
OK,
I need to add something else than Jpeg image, but I could change it into it. (I just Assign TBitmap into it)
I just tough it would compress all images as Jpeg if property set
Because it says it'll Force it
Thanks for your support!!!
I'll look into it...
-TP-
Hello,
I use TPdfImage to add HighResolution bitmaps to the (Pdf)Canvas (Not the VCL one).
Dow not matter which value I set for the ForceJPEGCompression (Tested values 0, 30, 60 and 90 (At least)). File will have exact same size, no matter of the value of the property.
I even made 850mb .pdf file, and compressed it with 7-zip and it compressed into about 8.5MB, so it definitely have some room for compression.
Same results with an .CompressionMethod := cmFlateDecode;
Don't know will this lib support compressing images with (de)Flate/Zip/Zlib (What ever called
)
Any ideas, is this an bug in library, or in my code??? What could cause this.
This is not an issue for me now, but maybe later it is... (so no panic, for me, just wondering
)
And BTW. Could do some good to have comment like this in the code
0 = Disabled
1 = Low compression (Large files, good quality)
100 = High compression (Small files, poor quality)
(Or other way round, can't remember which way it was ![]()
-TP-
Hello,
Would it be possible to have your new versions in some kind of test file or in .pas file. '
So I could check some out and maybe patch some D6 methods by hand etc... (Or D2007)...
Because Most likely I can't use whole update, but some could help me a lot...
-TP-
OK,
I forgot this totally,
Bug was between the screen and back of my head
Sorry about this, hope there would be native Stream "interface" in next release. So I would get rid of this "hack" ![]()
It is very fast indeed, in memory compression especially
Thanks for this!!!
-TP-
Ok,
Is there some demo code, to loook at?
Thanks for your reply...
-TP-
Hello hello,
Can I use this library to make Pdf, with high resolution image and transparent text and images on top of those images.
I need to have high resolution background images and have some text and transparent image on top of it...
Can I do this, and if, any tips?
.TP.
Sorry.
I making fool of my self... I'll get back when I get this sorted out ![]()
-TP-
Whoooa...
I did jump a gun. Found and Error (or stumble upon one). Now you really wan't the Test code ![]()
There is some serious problem. That is why I did see lot of problems before.
-TP-
I don't think it could be useful to code LZ or LZO in pure C#. I suspect the gain in speed will be none compared to native standard zlib...
OK, my bad, I always mix up few things in .NOT world. I mean any .NET comptible implementation which I/we could use. Save or unsafe code, as long as it is working and fast is fine by me ![]()
Could you provide me with a whole testing program source code? Perhaps the problem is not in your code, but mine! ... I need the whole testing program...
Seems that it was totally my error, made testing program tough, which maybe you could use also
. In which Email address you would like to receive it (seems that this forum don't allow attachments)
-TP-
Hello,
I took the code from above for LZ-compression between streams and it works great, then I tried to make same code to work with LZO, and don't work. I just can't see what I am doing wrong here ![]()
procedure LZODecompressStream(const Source, Dest: TStream);
procedure LZOCompressStream(const Source, Dest: TStream);
procedure LZODecompressStream(const Source, Dest: TStream);
var
Size: Integer;
Buf, Tmp: Pointer;
ComprSize: Integer;
begin
Source.Read(ComprSize, SizeOf(ComprSize));
GetMem(Tmp, ComprSize);
try
Source.Read(Tmp^, ComprSize);
Size:= lzopas_decompressdestlen(Tmp);
GetMem(Buf, Size);
try
Size:= lzopas_decompress(Tmp, ComprSize, Buf);
if Size > 0 then
Dest.WriteBuffer(Buf^, Size);
finally
FreeMem(Buf);
end;
finally
FreeMem(Tmp);
end;
end;
procedure LZOCompressStream(const Source, Dest: TStream);
var
Size: Integer;
Buf, Tmp: Pointer;
ComprSize: Integer;
begin
Size:= Source.Size;
GetMem(Buf, Size);
try
Source.Seek(0, soFromBeginning);
Source.Read(Buf^, Size);
Size := lzopas_compressdestlen(Size);
GetMem(Tmp, Size);
try
ComprSize := lzopas_compress(Buf, Source.Size, Tmp);
Dest.Write(ComprSize, SizeOf(ComprSize));
if Size > 0 then
Dest.WriteBuffer(Tmp^, ComprSize);
finally
FreeMem(Tmp);
end;
finally
FreeMem(Buf);
end;
end;Maybe more eyes can tell me how stupid I really am ![]()
btw. is there ompatible C# implementation of LZ or LZO?
-TP-