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

Use new completion data structure #1

Open
victorteokw opened this issue Aug 18, 2015 · 3 comments
Open

Use new completion data structure #1

victorteokw opened this issue Aug 18, 2015 · 3 comments

Comments

@victorteokw
Copy link
Collaborator

Hi, @osv

I am currently improving efficiency of ac-html, and dividing attribute value list and docs may provide better efficiency.

How about your opinion?

@osv
Copy link
Owner

osv commented Aug 18, 2015

Hello, I'm doing city relocation and can't make code inspection, and patch web-company that depend on web-completion-data :).
As I see, you want get attribute values from files? But I think this is bad idea, better keep them all in single small file. There no so many files and they are all small:

/home/anon/work/github/web-completion-data/html-stuff/html-attributes-complete:
  total used in directory 384 available 34084680
  drwxr-xr-x 2 anon anon  4096 Jun 23 13:29 .
  drwxr-xr-x 7 anon anon  4096 Jun 18 22:07 ..
  -rw-r--r-- 1 anon anon  9526 Jun 23 13:29 a-hreflang
  -rw-r--r-- 1 anon anon  9526 Jun 23 13:29 area-hreflang
  -rw-r--r-- 1 anon anon   134 Jun 23 13:29 area-shape
  -rw-r--r-- 1 anon anon   151 Jun 23 13:29 area-target
  -rw-r--r-- 1 anon anon  8543 Jun 23 13:29 area-type
  -rw-r--r-- 1 anon anon   775 Jun 23 13:29 a-rel
  -rw-r--r-- 1 anon anon   151 Jun 23 13:29 a-target
  -rw-r--r-- 1 anon anon  8543 Jun 23 13:29 a-type
  -rw-r--r-- 1 anon anon   197 Jun 23 13:29 audio-crossorigin
  -rw-r--r-- 1 anon anon   274 Jun 23 13:29 audio-preload
  -rw-r--r-- 1 anon anon   151 Jun 23 13:29 base-target
  -rw-r--r-- 1 anon anon    64 Jun 23 13:29 button-formenctype
  -rw-r--r-- 1 anon anon     8 Jun 23 13:29 button-formmethod
  -rw-r--r-- 1 anon anon    86 Jun 23 13:29 button-type
  -rw-r--r-- 1 anon anon  8543 Jun 23 13:29 embed-type
  -rw-r--r-- 1 anon anon  4097 Jun 23 13:29 form-accept-charset
  -rw-r--r-- 1 anon anon     6 Jun 23 13:29 form-autocomplete
  -rw-r--r-- 1 anon anon    64 Jun 23 13:29 form-enctype
  -rw-r--r-- 1 anon anon     8 Jun 23 13:29 form-method
  -rw-r--r-- 1 anon anon   151 Jun 23 13:29 form-target
  -rw-r--r-- 1 anon anon    10 Jun 23 13:29 global-contenteditable
  -rw-r--r-- 1 anon anon    12 Jun 23 13:29 global-dir
  -rw-r--r-- 1 anon anon  9526 Jun 23 13:29 global-lang
  -rw-r--r-- 1 anon anon    10 Jun 23 13:29 global-spellcheck
  -rw-r--r-- 1 anon anon 20476 Jun 23 13:29 global-style
  -rw-r--r-- 1 anon anon     6 Jun 23 13:29 global-translate
  -rw-r--r-- 1 anon anon   290 Jun 23 13:29 iframe-sandbox
  -rw-r--r-- 1 anon anon   197 Jun 23 13:29 img-crossorigin
  -rw-r--r-- 1 anon anon    23 Jun 23 13:29 input-accept
  -rw-r--r-- 1 anon anon     6 Jun 23 13:29 input-autocomplete
  -rw-r--r-- 1 anon anon    64 Jun 23 13:29 input-formenctype
  -rw-r--r-- 1 anon anon     8 Jun 23 13:29 input-formmethod
  -rw-r--r-- 1 anon anon     3 Jun 23 13:29 input-step
  -rw-r--r-- 1 anon anon  1908 Jun 23 13:29 input-type
  -rw-r--r-- 1 anon anon   197 Jun 23 13:29 link-crossorigin
  -rw-r--r-- 1 anon anon  9526 Jun 23 13:29 link-hreflang
  -rw-r--r-- 1 anon anon  4632 Jun 23 13:29 link-media
  -rw-r--r-- 1 anon anon   933 Jun 23 13:29 link-rel
  -rw-r--r-- 1 anon anon   329 Jun 23 13:29 link-sizes
  -rw-r--r-- 1 anon anon  8543 Jun 23 13:29 link-type
  -rw-r--r-- 1 anon anon  4097 Jun 23 13:29 meta-charset
  -rw-r--r-- 1 anon anon   977 Jun 23 13:29 meta-content
  -rw-r--r-- 1 anon anon   642 Jun 23 13:29 meta-http-equiv
  -rw-r--r-- 1 anon anon    96 Jun 23 13:29 meta-name
  -rw-r--r-- 1 anon anon  8543 Jun 23 13:29 object-type
  -rw-r--r-- 1 anon anon   335 Jun 23 13:29 ol-type
  -rw-r--r-- 1 anon anon  4097 Jun 23 13:29 script-charset
  -rw-r--r-- 1 anon anon   197 Jun 23 13:29 script-crossorigin
  -rw-r--r-- 1 anon anon  8543 Jun 23 13:29 script-type
  -rw-r--r-- 1 anon anon     6 Jun 23 13:29 select-autocomplete
  -rw-r--r-- 1 anon anon  8543 Jun 23 13:29 source-type
  -rw-r--r-- 1 anon anon  8543 Jun 23 13:29 style-type
  -rw-r--r-- 1 anon anon     1 Jun 23 13:29 table-border
  -rw-r--r-- 1 anon anon     6 Jun 23 13:29 textarea-autocomplete
  -rw-r--r-- 1 anon anon   231 Jun 23 13:29 textarea-wrap
  -rw-r--r-- 1 anon anon   235 Jun 23 13:29 th-scope
  -rw-r--r-- 1 anon anon  1146 Jun 23 13:29 track-kind
  -rw-r--r-- 1 anon anon  9526 Jun 23 13:29 track-srclang
  -rw-r--r-- 1 anon anon   197 Jun 23 13:29 video-crossorigin
  -rw-r--r-- 1 anon anon   274 Jun 23 13:29 video-preload

And over 2.5k values

anon@convict:~/work/github/web-completion-data/html-stuff/html-attributes-complete$ grep . * | wc -l
2497

As you may remember, I create tool h5doc that create attribute's values from single yaml file. And current yaml file for web-completion-data located - https://github.com/osv/h5doc/blob/master/text/attr-values.yaml

So.

  1. I have no time to patch company's mode package that depend on web-completion-data.
  2. I don't agree that 2500 small files better than 60. Especial for my HDD :)
  3. How to maintain all these 2500 files? Many docs are shared for attributes. As for me, yaml config file may do it better, YAML provide reusable code if you use anchors.

I think need include ttps://github.com/osv/h5doc/blob/master/text/attr-values.yaml to this package and make some documentation how to contribute.

@victorteokw
Copy link
Collaborator Author

How about use json? There is a package "json" builtin with emacs.Read json is faster than read from file.

@osv
Copy link
Owner

osv commented Aug 23, 2015

you want make ALL completion in single json?

maybe good idea, because there is good js-yaml package which can convert from yaml to json :)

But as for me current version of ac-html and company-web are good and I have no perfomance problem even working on slow pc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants