-
Content Count
110 -
Joined
-
Last visited
Posts posted by Sonjli
-
-
Hi,
ok, I set my mind in ease...
-
Hello,
I have an automation system to deploy a big application.
In this automation system I build some projects in Delphi.
I use the "Set Component Properties" of GExperts to update some properties before the build process. I do this "by hand" setting this:
Is it possible to use a command line for any tool of GExperts? Or an sdk to implements this?
Thanks,
Eddy
-
21 minutes ago, Lars Fosdal said:@Sonjli - Did you read this article? https://blog.grijjy.com/2020/10/07/an-xml-dom-with-just-8-bytes-per-node/Not sure how that lib would fare with regards to CPU usage - but it should be fast enough.Edit: Doh... I didn't realize Neslib was the lib in the article 😛
Need more coffee.
I need strongest drugs... but also for me a coffee is enough for now 😅
-
7 hours ago, David Heffernan said:I'm not sure what you want to do. Do you want to read the XML quickly? Or do you want to read the XML without using CPU resources? Because it seems like you want to do both but of course you can do one or the other but not both.
I need to read the XML quickly. But the server administrator warn me often about high cpu. I understand your axiom.
I use Neslib.Xml and it seems well done both in performance and resource utilization. So you recommend me to say to sa to "put his heart in peace"...
24 minutes ago, Fr0sT.Brutal said:Show us your code, probably it could be optimized though I wouldn't count on great improvement. Reading and manipulating big XML is always quite slow
I can publish the problematic loops but, as you write, the "problem" is implicitly the XML library.
Thanks guys.
-
Hello,
I have a task with three nested loops using an XML library to read some parts of a big XML.
This loop is too tight and processor works between 20% and 30% only for this process.
The "sleep" is not a solution because the XML must be read very quickly.
Is there any other solution to avoid the use of so much processor?
Thanks,
Eddy
-
What kind of infos do you need to reproduce?
-
-
On 9/4/2020 at 7:14 PM, jbg said:Maybe a problem with the Virus-Scanner?
Hi,
sorry for the late...
No, it's not related with virus-scanner. I don't know... I'll try to clean "something" again.
-
5 hours ago, jbg said:The WebInstaller detection in IdeFixPack looks at a specific environment variable but that variable is also set of you start the IDE with Administrator rights or if some other program added the environment variable. (I don't remember what env-var it is and I don't the the source code at hand where I am right now)
The WebInstaller detection code was removed in the last development snapshot:
https://idefixpack.de/fixpack/dev
But be aware that the development snapshot may crash the IDE more often as it is not tested.
Thank you very much. IDEFixPack is a must have. Problem solved. I will pay attention about instability.
The problem with the CompilerSpeedPack dlls remains... I disabled them as I don't use. What can be the problem?
Eddy
-
-
Hello,
from this morning IDEFixPack 6.4.4 stop working on my IDE. I don't know what's changed. It's weird. Since today I never reinstall the expert, and never had any issue.
The error is in attachments.
Infos:
- Windows 10 professional - 2004 (May updates)
- Delphi 10.3.3 full patched
- I always install with ISO, NOT Webinstaller. I NEVER used webinstaller in my life
- I start the IDE "as administrator".
- I restarted the pc but nothing changes
- More weird: I uninstalled and reinstalled the 6.4.4 and from there the errors multiplied (more attachments).
- The DLLs BPLs and everything are in their right place (C:\Users\Public\Documents\Embarcadero\Studio\20.0\Experts\). Checked also with GExperts "Expert Manager" and in registry
- If I start the IDE NOT "as administrator" the problem with DLLs CompilerSpeedPack remains, but IDEFixPack starts correctly
What's going on?
Anyone knows this behaviour?
Thanks,
Eddy
-
19 hours ago, Anders Melander said:Apartment threading just means that ingoing COM calls are executed on the main thread. This is like using TThread.Synchronize to ensure that code that isn't thread safe is executed in the context of the main thread. If your code is thread safe or if you are sure that you're not using callbacks (e.g. COM events) then COINIT_MULTITHREADED is probably fine.
I DO use COM events... so, should I change COINIT_MULTITHREADED in COINIT_APARTMENTTHREADED?
Can this make server unstable?
Remark: the server is no more reachable from other clients until I close my "buggy" ntservice. When this issue happens, I stop my ntservice and the other clients connects correctly.
I doubt it is a server issue, I am barely sure I am doing something wrong.
-
1 hour ago, Anders Melander said:I think you need to post some more code and some more details.
-
Does the OleCheck ever raise an exception? If so how do you handle this exception?
- Never, I log this
-
Are you sure that you shouldn't be using COINIT_APARTMENTTHREADED instead?
- Every NTService create a lot of threads, so I think COINIT_MULTITHREADED is the right choice... I think...
-
Are you sure there's a CoUninitialize for every CoInitializeEx?
- No. I am very angry. I didn't see this
-
How does the server disconnect the client?
- Mistery. It's a third party server. Poor documentation
-
Have you tried debugging the server to determine what it's doing when it "hangs"?
- The logs of the server resides in a remote machine. The machine is a CNC. Very hard to get inside...
-
Does the OleCheck ever raise an exception? If so how do you handle this exception?
-
Is it possible that if I never call the CoUninitialize the server goes out of order or lock after a lot of calls?
I call CoInitilize every 5 minutes but I forgot calling CoUninitialize... f**k.
-
Hello,
I hope not to be out of topic...
I have a COM client (developed as NTService) that every 5 minutes need to reconnect to server (don't ask me why... the COM server kick out clients for "security" every 5 minutes).
In every "connect" I do this: OleCheck(CoInitializeEx(nil, COINIT_MULTITHREADED))
Can this be a problem? I see that sometimes, after 30/40 reconnections, the COM server seems "locked". No other clients can connect correctly to the server until I kill my NTService.
It is not fault of the "security" system, because I still tested that.
Any ideas?
Ask me for infos if you need.
Thanks in advance,
Eddy
-
Ok, this is my last chance... after this you must wait for @Primož Gabrijelčič
Try something like this:
procedure ProcessMessages; var Msg: TMsg; begin while integer(PeekMessage(Msg, 0, 0, 0, PM_REMOVE)) <> 0 do begin TranslateMessage(Msg); DispatchMessage(Msg); end; end; ... FKeepAlive.Stop; repeat ProcessMessages; until FKeepAlive.Terminate(1000); ...
-
Hi,
I am pretty sure the problem is related to this: http://www.omnithreadlibrary.com/book/chap05.html#introotl-messagelooprequired-console
Regards,
Eddy
-
The only problem I know about console apps is about "omni messaging system". Look at documentation http://www.omnithreadlibrary.com/book/chap05.html#introotl-messagelooprequired-console
Maybe after 5 seconds the parallel timer is not terminated.
Try this:
destructor TjBASEComm.Destroy; begin if Assigned(FKeepAlive) then try FKeepAlive.Stop; FKeepAlive.Terminate; FKeepAlive.WaitFor; // This wait until the task is REALLY terminated. If it is stuck then the problem is elsewhere except end; try FConn.Free; except end; inherited; end;
There is also a doubt about "FConn.SendStr('')": what does it do?
Regards,
Eddy
-
Hi,
I think your problem is FConn. It seems a class field, and maybe it is destroyed before the timer ends?
Regards,
Eddy
-
-
Hello,
I am trying to read from a tcp socket some data and elaborate it in a pipeline.
The pipeline should do something like this:
Stage 1: polling the tcp socket and write the list of bytes in Output
Stage 2: read output and make some calculation with bytes (I need to know when a packet starts and ends)
The problem is that in the second stage I receive a list of simple "numbers" (a list of bytes) not continously. I mean that the bytes arrive in groups, but I need to save them in a global array to make my decisions.
Questions:
1. Is the pipeline the right choice?
2. How can I use a global array inside a Pipeline? (I can't use SetParameter as in ITaskController)
Thanks in advance
Eddy
-
It's hard to reproduce, yes I understand your pov...
I'll try
-
Ok, thank you as usual.
So, I have this strange behavoiur:
The task receiving messages sometimes slow very down, and I can see 30/40 messages queued from the "external" thread, but only one elaboration of my task loop.
So in this situation the queue risks to be full very quickly (1000 messages I read in docs).
But I don't know why this happens... a loop too thight?
-
Hello,
I am trying to start communication between two threads.
The first thread is not mine, it come from an external component library (always Delphi).
This component has an event "OnSomethingHappens" that fires in a separate thread.
So, in this event I use the OTL Communication system. For example: lMyTask.Comm.Send(WM_MYMESSAGE, MyObject);
In my task I do a simple loop like this:
while Task.Comm.Receive(lMsg) do
begin
if lMsg.MsgID = WM_MYMESSAGE then
etc.But watching at OTL demos I see that you do somthing like this:
repeat
case DSiWaitForTwoObjects(task.TerminateEvent, task.Comm.NewMessageEvent, false, task.Param['Delay']) of
WAIT_OBJECT_1:
begin
while task.Comm.Receive(msgID, msgData) do begin
if msgID = MSG_CHANGE_MESSAGE then
msg := msgData;
end;
end;
WAIT_TIMEOUT:
task.Comm.Send(0, msg);
else
break; //repeat
end;
until false;Sorry for my ignorance but I don't understand why you use the DSiWaitForTwoObjects and what it means.
As I am having some problems in my loop, I think they are related to this use case... so can you explain, please?
Thanks again,
Eddy
Build to deploy process
in GExperts
Posted
Hi,
yes I'd prefer this. How do you do this?
GExperts does this before compiling or building.