Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6660693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:11:12+00:00 2026-05-26T02:11:12+00:00

I really love the Factor language. But I find that compiling programs written in

  • 0

I really love the Factor language. But I find that compiling programs written in it is incredibly slow, and thus it’s not feasible to create real projects with Factor.

For example, compiling the sample Calculator WebApp takes about 5 minutes on my laptop (i3 processor, 2GB RAM, running Fedora 15).

I’ve searched around but couldn’t find a faster way to compile Factor programs than using the interpreter (the main factor binary executable).

It becomes ridiculous when you attempt to only use the interpreter for each run and not “deploy” your program to a native binary file (which doesn’t even work on many programs).
It means that every time I want to run the Calculator, for example, I have to wait a 5 minute cold-start duration.

I’d like to know whether this is a common issue, and whether there’s a good way to tackle it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:11:13+00:00Added an answer on May 26, 2026 at 2:11 am

    I admit that before today, I had never heard of Factor. I took the opportunity to play with it. It is looking nice (reminds me of squeak-vm and lisp at the same time). I’ll cut the smalltalk (pun very much intended) and jump to your question.

    Analysis

    It appears that the way Factor works, results in loading vocabularies being slow.

    I compiled Factor on my 64 bit quadcore linux system (from git revision 60b1115452, Thu Oct 6). Putting everything on tmpfs the build dir takes 641Mb, of which 2x114Mb is in the factor.image and its backup (factor.image.fresh).

    When strace-ing the calculator app loading, there is a huge list of factor files being loaded:

    • 3175 factor files are touched.
    • compilation of these takes roughly 30 seconds on my box
    • the memory usage maxes out on just under 500Mb (virtual) and 300Mb reserved set

    I’m strongly suspecting your box is low on memory, and might be getting very swappy
    This would definitely explain compilation taking 5 minutes

    Can you confirm whether this is the case (likely if you are running some kind of shared host or VPS appliance). If you run a virtual machine, consider increasing the available system memory.


    Saving Heap Images (snapshots)

    I already mentioned the factor.image file (114Mb) before. It contains a ‘precompiled’ (bootstrapped, actually) heap image for the Factor VM. All operations in the VM (working on the UI listener or compiling factor files) affects the heap image.

    To avoid having to recompile your source files time and time again, you can save the end-result into a custom heap image:

    http://docs.factorcode.org/content/article-images.html

    Images

    To start Factor with a custom image, use the -i=image command line switch; see Command line switches for the VM.

    One reason to save a custom image is if you find yourself loading the same libraries in every Factor session; some libraries take a little while to compile, so saving an image with those libraries loaded can save you a lot of time.

    For example, to save an image with the web framework loaded,

    USE: furnace
    save
    

    New images can be created from scratch: Bootstrapping new images

    Deploying applications

    Saving heap images results in files that will (typically) be bigger than the original bootstrap image.

    The Application deployment tool creates stripped-down images containing just enough code to run a single application

    The stand-alone application deployment tool, implemented in the tools.deploy vocabulary, compiles a vocabulary down to a native executable which runs the vocabulary’s MAIN: hook. Deployed executables do not depend on Factor being installed, and do not expose any source code, and thus are suitable for delivering commercial end-user applications.

    Most of the time, the words in the tools.deploy vocabulary should not be used directly; instead, use Application deployment UI tool.

    You must explicitly specify major subsystems which are required, as well as the level of reflection support needed. This is done by modifying the deployment configuration prior to deployment.

    Concluding

    I expect you’ll benefit from (in order of quickest win):

    • increasing available RAM (only quick in virtual environments…)
    • saving a heap image with
    USE: db.sqlite
    USE: furnace.alloy
    USE: namespaces
    USE: http.server
    save
    

    This step brought the compilation on my system down from ~30s to 0.835s

    • deploying the calculator webapp to a stripped heap image (refer to the source for deployment hints)

    In short, thanks for bringing Factor to my attention, and I hope my findings will be of any help, Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i really love the jquery validation plugins, look neat stylish and accessible, but as
There is one thing I really love about LXML, and that the E builder.
I'm fairly new (ok, REALLy new) to generics but I love the idea of
One thing I really love about languages such as Python is that if you
I am fairly familiar with Autofac and one feature that I really love about
I really love node.js but it´s really complicating when you want to run multiple
I really love using the IEnumerable extension methods. But sometimes I end up with
I don't really love when the code in the page is written in one
I really love programming. But the cumbersome part is to setup the unix development
I'd really love this to work in IE. I'm not able to change the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.