[IronPython] Performance concerns with mail merge

David C obiwantcp at hotmail.com
Tue Sep 19 00:10:03 CEST 2006

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
        return cleanText;
So far what I have learned is that I can do this in C#, using something like this example:
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060918/ccc5c700/attachment.html>

More information about the Ironpython-users mailing list