Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not limited to the object numbers #6

Closed
uribo opened this issue Dec 27, 2018 · 1 comment
Closed

Not limited to the object numbers #6

uribo opened this issue Dec 27, 2018 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@uribo
Copy link
Owner

uribo commented Dec 27, 2018

現在、処理速度の問題から1000件以上のデータがあるファイルについてはsfではなくlistで返却するようになっている。

fgdr/R/read_fdg.R

Lines 254 to 261 in 535e061

if (length(res) >= 10000) {
rlang::inform("There are over 10,000 elements. Because there are many cases, will be return it as a list.")
} else {
res <-
res %>%
purrr::reduce(rbind)
}
}

件数によってクラスが異なるのも変なのでsfにする、かつ処理時間の問題を解決する。

@uribo uribo added enhancement New feature or request help wanted Extra attention is needed labels Dec 27, 2018
@uribo
Copy link
Owner Author

uribo commented Dec 27, 2018

benchmark ...🐌

bench::mark(
+   fgdr::read_fgd("FG-GML-563804-BldA-20180101-0001.xml"),
+             max_iterations = 3)
There are over 10,000 elements. Because there are many cases, will be return it as a list.
# A tibble: 1 x 14
  expression             min   mean  median   max `itr/sec` mem_alloc  n_gc n_itr total_time result memory  time  gc   
  <chr>               <bch:> <bch:> <bch:t> <bch>     <dbl> <bch:byt> <dbl> <int>   <bch:tm> <list> <list>  <lis> <lis>
1 "fgdr::read_fgd(\"…  4.99m  4.99m   4.99m 4.99m   0.00334    1.78GB   369     1      4.99m <list… <Rprof… <bch… <tib…
Warning messages:
1: In st_collection_extract.sf(., "POLYGON") :
  x contains no geometries of specified type
2: In st_collection_extract.sf(., "POLYGON") :
  x contains no geometries of specified type
3: Some expressions had a GC in every iteration; so filtering is disabled. 

ここからsfにするにはさらに処理が必要で、こちらも時間がかかる。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant