Hi all,
I'm looking for a bit of advice. A project i'm currently working on
uses a custom search facility. The client has recently asked for the
functionality of the search engine to be extended, so people can use
speech marks to enclose certain words and various other characters.
I have coded this in c# and it sits in a code behind file. Due to
having to break the query string into tokens (char array) and then
parse through this with logic, i'm worried about performance issues.
Would it be better to write an exe in C++ which encapsultes the search
functionality? It could take a query input and return the resultant
SQL. Being compiled it should be a lot faster.
Would this be the best way forwards? Would there be any issues calling
the .exe from the ASP.NET site? (I have full access to their
production server, so could make what changes are needed.
Thanks,
Paul
George Ter-Saakov - 20 Jul 2007 16:09 GMT
Bad idea. It will be slower.
C# is not much slower than C++.
You will lose much more time to start separate process and then pass data
there (separate memory space) and getting result from there.
George.
> Hi all,
>
[quoted text clipped - 15 lines]
>
> Paul
bruce barker - 20 Jul 2007 16:39 GMT
process create in nt is very slow and expensive. your parsing code would
have to be very badly written to be slower than the overhead of running
an exe.
-- bruce (sqlwork.com)
> Hi all,
>
[quoted text clipped - 15 lines]
>
> Paul
Paul - 20 Jul 2007 16:53 GMT
> process create in nt is very slow and expensive. your parsing code would
> have to be very badly written to be slower than the overhead of running
[quoted text clipped - 23 lines]
>
> - Show quoted text -
Thanks all, the unmanaged compiled c++ code ran very fast (faster than
the same code in a c# compiled .exe), but if it does too long to load
the .exe then any gains would be lost.