Re: [fpc-pascal] FreePascal and MySQL

2015-05-01 Thread Adriaan van Os

Terry A. Haimann wrote:

I was kind of unimpressed with the performance of TSqlQuery compared to
c.  


To build a table really fast, try Postgres COPY FROM STDIN / TO STDOUT BINARY 
http://www.postgresql.org/docs/9.2/static/sql-copy.html with Postgres libpq 
http://www.postgresql.org/docs/9.2/static/libpq.html. And I have experienced Postgres performning 
(much) better under heavy loads than MySQL.


Regards,

Adriaan van Os
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-01 Thread leledumbo
 ARequest.URI ? 
 Forgot to mention that there is a global Request property which is the 
 same. 
 So Request.URI ... 

It's empty in CGI/FastCGI/Embedded Webserver. Did I just find another bug?

This is the result of dumping [A]Request properties:

[CGI, URL = http://localhost/test.fpw/m/helloget]
ScriptName  /test.fpw
PathInfo/m/helloget
URI 
ReturnedPathInfom
LocalPathPrefix ../../
CommandLine 
Command 
QueryString 
HeaderLine

[FastCGI, URL = http://fpfcgi.local/m/helloget]
ScriptName  fpfcgi.local
PathInfo/m/helloget
URI 
ReturnedPathInfom
LocalPathPrefix ../../
CommandLine 
Command 
QueryString 
HeaderLine  

[Embedded Webserver, URL = http://localhost:2015/m/helloget]

PathInfom/helloget
URI 
ReturnedPathInfom
LocalPathPrefix ../
CommandLine 
Command 
QueryString 
HeaderLine  HTTP/1.1




--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/fcl-web-retrieve-URI-given-TFPWebModule-and-TFPWebAction-instances-tp5721650p5721656.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-01 Thread ABorka

ARequest.URI ?


There are other properties that can be useful:
ARequest.URL
ARequest.Location
ARequest.PathInfo
ARequest.PathTranslated
ARequest.ScriptName
ARequest.Query


On 5/1/2015 07:29, leledumbo wrote:

Is there any easy way to retrieve URI given TFPWebModule and TFPWebAction
instances?

for instance:
...
RegisterHTTPModule('m',TAModule);
...
from inside an action's request handler:
procedure Tm.XXXRequest(Sender: TObject; ARequest: TRequest;
   AResponse: TResponse; var Handled: Boolean);
begin
   AResponse.Content := GetURI(Self,Actions.CurrentAction); // will be
'/m/xxx'
end;



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/fcl-web-retrieve-URI-given-TFPWebModule-and-TFPWebAction-instances-tp5721650.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-01 Thread leledumbo
Is there any easy way to retrieve URI given TFPWebModule and TFPWebAction
instances?

for instance:
...
RegisterHTTPModule('m',TAModule);
...
from inside an action's request handler:
procedure Tm.XXXRequest(Sender: TObject; ARequest: TRequest;
  AResponse: TResponse; var Handled: Boolean);
begin
  AResponse.Content := GetURI(Self,Actions.CurrentAction); // will be
'/m/xxx'
end;



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/fcl-web-retrieve-URI-given-TFPWebModule-and-TFPWebAction-instances-tp5721650.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-01 Thread ABorka
Forgot to mention that there is a global Request property which is the 
same.

So Request.URI ...

AB

On 5/1/2015 08:59, ABorka wrote:

ARequest.URI ?


There are other properties that can be useful:
ARequest.URL
ARequest.Location
ARequest.PathInfo
ARequest.PathTranslated
ARequest.ScriptName
ARequest.Query


On 5/1/2015 07:29, leledumbo wrote:

Is there any easy way to retrieve URI given TFPWebModule and TFPWebAction
instances?

for instance:
...
RegisterHTTPModule('m',TAModule);
...
from inside an action's request handler:
procedure Tm.XXXRequest(Sender: TObject; ARequest: TRequest;
   AResponse: TResponse; var Handled: Boolean);
begin
   AResponse.Content := GetURI(Self,Actions.CurrentAction); // will be
'/m/xxx'
end;



--
View this message in context:
http://free-pascal-general.1045716.n5.nabble.com/fcl-web-retrieve-URI-given-TFPWebModule-and-TFPWebAction-instances-tp5721650.html

Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FreePascal and MySQL

2015-05-01 Thread Jonas Maebe
On 01/05/15 18:07, Terry A. Haimann wrote:
 I wrote two programs that built the same identical table.  A random set
 of names with addresses.  I found the user time of the program written
 in c was 20% of that which was written in Free Pascal.

How did you generate the random names? FPC uses the Mersenne twister as
random generator, which is quite good but also quite cpu intensive. Most
C standard libraries uses a linear congruential generator, which is very
fast but less good.

I.o.w., you may have been comparing the performance of the random number
generators rather than of the SQL interface.


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] FreePascal and MySQL

2015-05-01 Thread Terry A. Haimann
I was kind of unimpressed with the performance of TSqlQuery compared to
c.  

I wrote two programs that built the same identical table.  A random set
of names with addresses.  I found the user time of the program written
in c was 20% of that which was written in Free Pascal.

Is there any chance of someone working on this library to improve
performance?

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal