Fixes high cache miss rate, significant performance increase. Closes #92

This commit is contained in:
xDuck 2020-05-15 15:32:44 -04:00
parent c028e66556
commit efed726c9e
33 changed files with 36 additions and 35 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,7 +6,7 @@ import (
"encoding/hex"
"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/filters"
)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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