Merge pull request #93 from xDuck/master

Fixes high cache miss rate, significant performance increase.
This commit is contained in:
Mark Bates 2020-05-15 17:09:09 -04:00 committed by GitHub
commit d97c60c346
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 36 additions and 35 deletions

View File

@ -8,8 +8,8 @@ import (
"sort" "sort"
"strings" "strings"
"github.com/gobuffalo/here"
"github.com/markbates/pkger" "github.com/markbates/pkger"
"github.com/markbates/pkger/here"
"github.com/markbates/pkger/parser" "github.com/markbates/pkger/parser"
"github.com/markbates/pkger/pkging/pkgutil" "github.com/markbates/pkger/pkging/pkgutil"
) )

View File

@ -5,7 +5,7 @@ import (
"flag" "flag"
"os" "os"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/parser" "github.com/markbates/pkger/parser"
) )

View File

@ -6,8 +6,8 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/gobuffalo/here"
"github.com/markbates/pkger" "github.com/markbates/pkger"
"github.com/markbates/pkger/here"
) )
type pathCmd struct { type pathCmd struct {

View File

@ -8,6 +8,7 @@ type Info = here.Info
type Module = here.Module type Module = here.Module
type Path = here.Path type Path = here.Path
var Dir = here.Dir var Here = here.New()
var Package = here.Package var Dir = Here.Dir
var Current = here.Current var Package = Here.Package
var Current = Here.Current

View File

@ -8,7 +8,7 @@ import (
"sort" "sort"
"sync" "sync"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
) )

View File

@ -8,7 +8,7 @@ import (
"sort" "sort"
"sync" "sync"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
) )
// Infos wraps sync.Map and uses the following types: // Infos wraps sync.Map and uses the following types:

View File

@ -3,7 +3,7 @@ package parser
import ( import (
"encoding/json" "encoding/json"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
) )
type File struct { type File struct {

View File

@ -7,7 +7,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
) )
var _ Decl = IncludeDecl{} var _ Decl = IncludeDecl{}

View File

@ -11,7 +11,7 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
) )
var defaultIgnoredFolders = []string{".", "_", "vendor", "node_modules", "testdata"} var defaultIgnoredFolders = []string{".", "_", "vendor", "node_modules", "testdata"}

View File

@ -8,7 +8,7 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/pkging/pkgtest" "github.com/markbates/pkger/pkging/pkgtest"
"github.com/markbates/pkger/pkging/stdos" "github.com/markbates/pkger/pkging/stdos"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"

View File

@ -8,7 +8,7 @@ import (
"strconv" "strconv"
"sync" "sync"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
) )
type Source struct { type Source struct {

View File

@ -7,7 +7,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
) )
var _ Decl = WalkDecl{} var _ Decl = WalkDecl{}

View File

@ -6,7 +6,7 @@ import (
"path/filepath" "path/filepath"
"sync" "sync"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
"github.com/markbates/pkger/pkging/stdos" "github.com/markbates/pkger/pkging/stdos"
) )

View File

@ -6,7 +6,7 @@ import (
"encoding/hex" "encoding/hex"
"io" "io"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/internal/takeon/github.com/markbates/hepa" "github.com/markbates/pkger/internal/takeon/github.com/markbates/hepa"
"github.com/markbates/pkger/internal/takeon/github.com/markbates/hepa/filters" "github.com/markbates/pkger/internal/takeon/github.com/markbates/hepa/filters"
) )

View File

@ -1,7 +1,7 @@
package embed package embed
import ( import (
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
) )

View File

@ -4,7 +4,7 @@ import (
"net/http" "net/http"
"os" "os"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
) )
type File interface { type File interface {

View File

@ -6,7 +6,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )

View File

@ -6,7 +6,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
) )

View File

@ -5,7 +5,7 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/pkging/mem" "github.com/markbates/pkger/pkging/mem"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )

View File

@ -3,7 +3,7 @@ package mem
import ( import (
"encoding/json" "encoding/json"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/internal/maps" "github.com/markbates/pkger/internal/maps"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
"github.com/markbates/pkger/pkging/embed" "github.com/markbates/pkger/pkging/embed"

View File

@ -10,7 +10,7 @@ import (
"path/filepath" "path/filepath"
"time" "time"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
) )

View File

@ -4,7 +4,7 @@ import (
"io/ioutil" "io/ioutil"
"testing" "testing"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )

View File

@ -8,7 +8,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/internal/maps" "github.com/markbates/pkger/internal/maps"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
) )

View File

@ -4,7 +4,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
) )
type Pkger interface { type Pkger interface {

View File

@ -7,7 +7,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
) )

View File

@ -5,7 +5,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )

View File

@ -8,7 +8,7 @@ import (
"path/filepath" "path/filepath"
"runtime" "runtime"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
) )
type Ref struct { type Ref struct {

View File

@ -6,7 +6,7 @@ import (
"io" "io"
"os" "os"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
) )

View File

@ -6,7 +6,7 @@ import (
"os" "os"
"strings" "strings"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/parser" "github.com/markbates/pkger/parser"
"github.com/markbates/pkger/pkging/embed" "github.com/markbates/pkger/pkging/embed"
"github.com/markbates/pkger/pkging/mem" "github.com/markbates/pkger/pkging/mem"

View File

@ -5,7 +5,7 @@ import (
"os" "os"
"path" "path"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
) )

View File

@ -3,7 +3,7 @@ package stdos
import ( import (
"testing" "testing"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )

View File

@ -6,7 +6,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
"github.com/markbates/pkger/internal/maps" "github.com/markbates/pkger/internal/maps"
"github.com/markbates/pkger/pkging" "github.com/markbates/pkger/pkging"
) )

View File

@ -5,7 +5,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/gobuffalo/here" "github.com/markbates/pkger/here"
) )
func Wrap(parent, with Pkger) Pkger { func Wrap(parent, with Pkger) Pkger {