[IronPython] Performance concerns with mail merge

David C obiwantcp at hotmail.com
Mon Sep 18 15:10:03 PDT 2006


Hi,
 
We have a mail merge engine. We wish to have the option of blessing mail merge fields (say <##FirstName##>) with the ability to do string formatting, such as proper casing, all caps, date formatting, and such. And the idea is while the mail merge engine is compiled C# code, we are hoping to leverage the dynamic nature of ironpython to allow business analysts and other staff to bless these mail merge fields with dynamic behaviors at a later date--through scripting. We imagine the signature of such a "filter" would go something like:
 
protected string Filter_SomeBase32GibberishThatsSafeAlphaNumeric(string dirtyText, Xml filterContext)
{
    string cleanText = "";
 
    try {
        // the dynamic part that do something with cleanText, given additional information provided by filterContext xml dom
        // as an aside, this source code is checked into the db in raw source code form, until the time it need be used
    }
    finally
    {
        return cleanText;
    }
}
 
So far what I have learned is that I can do this in C#, using something like this example:
 
http://www.codeproject.com/dotnet/evaluator.asp?df=100&forumid=13971&exp=0&fr=26&select=394822
 
But we want a ton of performance out of this merge intelligence. We hope whatever was compiled (bytecode), is kepted in a hash tree so that recompilation is not a tax levied on each invocation. There will be many such functions, and we need to invoke it by reference/delegate (storing them in a lookup table).
 
If we are really really greedy, we would make further requests like it be possible to update a function. To recompile an updated source code to one such instance and call the new updated bytecode.
 
I have no experience with IronPython in terms of embedding it, and making use of it in such a scenario, and wish to consult the list for any suggestions or feasibility comments you may have. Thank you for your time and big kudos ahead of time for any participation on this.
 
Best regards,
-- Li-fan chen
 
 
 
 
_________________________________________________________________
Be one of the first to try Windows Live Mail.
http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ironpython.com/pipermail/users-ironpython.com/attachments/20060918/ccc5c700/attachment.html


More information about the users mailing list