Thank you Kenneth, here is the starting of my init.ml, I simplified it to make it more understandable, did I make any stupid problem.. ? Criticise me if it was true.. I didn't touch this part for a long time.. let main () = if Array.length Sys.argv <> 2 then print_string "XXX\n" else if check_strip Sys.argv.(1) == false then print_string "XXX\n" else XXX let () = main () On Fri, Jul 17, 2015 at 2:57 PM, Kenneth Adam Miller < kennethadammiller@gmail.com> wrote: > Right, I was wondering if I should tell you that. That means: > > let _ = > my main definition... > > or > > let () = > my main definition... > > each get evaluated very similarly to how a main function would. Is there > code that you can post in order that I/we can help you? > > On Fri, Jul 17, 2015 at 2:53 PM, Shuai Wang > wrote: > >> Here is my compilation script. >> >> ocamlbuild -use-ocamlfind XXX1.native XXX2.native ... init.native >> -ocamlopt "-inline 20" -ocamlopt -nodynlink >> >> And our tool always execute init.native. >> >> >> >> >> On Fri, Jul 17, 2015 at 2:50 PM, Kenneth Adam Miller < >> kennethadammiller@gmail.com> wrote: >> >>> Can you post your build specification? >>> >>> On Fri, Jul 17, 2015 at 2:35 PM, Shuai Wang >>> wrote: >>> >>>> Dear list, >>>> >>>> >>>> I am working on some tools written in OCaml (compiled by OCaml version >>>> 4.01.0). >>>> >>>> This morning I changed some code, compiled it and let it processing >>>> some large data (~ 4G), it never stops after over 2 hours. >>>> >>>> I feed the tool with a tiny input which took less than 1 second to >>>> process before, and I figured out that now it takes around 2.5 minutes >>>> before entering into "main" function! >>>> >>>> I tried to clean the whole codebase, and recompile it ( I use >>>> ocamlbuild 4.01.0), but the same wired situation still happens.. >>>> >>>> I did this: >>>> >>>> ltrace ./init.native input >>>> >>>> and I got this output flushing out for a very long time (sorry mail >>>> list blocks my large image.. ): >>>> >>>> http://i.stack.imgur.com/sEkKk.png >>>> >>>> >>>> >>>> Is anyone aware this kind of issue before..? Am I messed up >>>> something..? >>>> I have been working on OCaml for a relatively long time and I didn't >>>> encounter this kind of stuff before... >>>> >>>> >>>> Sincerely, >>>> Shuai >>>> >>> >>> >> >