Skip to content

Filler prints output when solving takes some time #136

@super7ramp

Description

@super7ramp

Issue

Filler prints some statistics when filling takes some time.

It's not really an issue when called from command-line but it's not desirable when integrating it as a library. (I've been working on integrating it in my own small tool. For now I've just patched it to remove the calls to println! from filler.)

Steps to reproduce

  1. Create the following grid in grids/empty_12x10.txt:
            
    *       
          * 
    *   *   
    *       
       *    
      *   * 
  *  *   *  
   *    *   
            
  1. Calls filler from command line: ./target/debug/xwords --width 12 --height 10 --input grids/empty_12x10.txt

Expected result

No progress output, unless specified otherwise (e.g. with an option from command-line). Ideally API would provide some kind of progress notification mechanism.

Actual result

After a while, some outputs starts to be printed periodically:

    C       
    *       
    C     *C
    *   *   
    *       
       *    
      *   *C
  *  *   *  
  P* O  *   
PHILOSOPHIST

(...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions